当我拉或推到 bitbucket 存储库时,我的 git 有问题。我总是收到这个错误:
致命:无法访问“ https://myrepo@bitbucket.org/****/** ”:无法连接到 bitbucket.org 端口 443:连接超时
我尝试了所有解决方案,但无法解决。
更新:28-08-2020
这是临时修复,但至少在 bitbucket 新 IP 更改后对我有用
注意:-hosts文件可以在 windows 中找到C:\Windows\System32\drivers\etc,在 Linux 中它存在于/etc/hosts. 确保您使用管理员权限进行编辑,即在 Windows 中以管理员身份打开记事本,然后打开主机文件。在 Linux 中sudo gedit /etc/hosts从任何位置的终端:)
只需在主机文件中添加以下行
18.205.93.0 bitbucket.org
对于以前编辑过etc/hosts文件但现在停止工作的所有现有用户,只需将 bitbucket 的旧 IP 地址替换为新 IP 地址,即etc/hosts
代替
104.192.143.3(old IP whatever) bitbucket.org
和
18.205.93.0 bitbucket.org
快乐编码!
建议1: 只需删除原点并重新设置原点,然后尝试拉/推即可。希望它对你有用。
git remote -v
git remote remove origin
git remote add origin https://habibbd@bitbucket.org/softwarebd/mida-oss.git
Run Code Online (Sandbox Code Playgroud)
建议 2:Windows/System32/drivers/etc/hosts如果其中任何行可用, 请从文件中删除这些行。
104.192.143.1 bitbucket.org
104.192.143.2 bitbucket.org
18.205.93.0 bitbucket.org
Run Code Online (Sandbox Code Playgroud)
建议 3:更改您的网络连接/提供商。有时您的网络提供商会导致此类问题。
建议 4: 检查防火墙设置。有时这是显示此类消息的问题。
如果您有旧版本,请尝试升级 git。
检查你的 git 版本:
$ git --version
Run Code Online (Sandbox Code Playgroud)
运行以下命令进行升级:
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git
Run Code Online (Sandbox Code Playgroud)