我在
$ git pull
上尝试$ git fetch
或myRepo
命令给我错误但myTestRepo
工作正常。
命令给我那个错误。
Fetching origin
fatal: unable to access 'http://mysite/myPath/myRepo.git/': Recv failure: Connection reset by peer
error: Could not fetch origin
我尝试了 git
$ git fetch -p
和 $ git fetch -p --all -f
命令,他们在命令给出相同的错误之后工作了一两次。
我正在使用
http
连接,我将连接更改为 ssh
而不是 http,问题就解决了
我遇到了类似的问题,但想通了。实际上,github 没有
http
,只有https
。尝试将 http
替换为 https
.
当你使用http url时,如果80被阻止,可能会发生这种情况。
我有这个问题
git clone xyz.git
我解决了它添加 sudo 突击队
sudo git clone xyz.git
如果您的公司通过 proxy 使用 github 那么:
在你的用户 .gitconfig 文件中,包含对应于 HTTPS 的代理 URL。
像下面的例子:
[https]
proxy = https://YOUR_HTTPS_PROXY:PORT_NUMBER
或者只是运行
git config --global https.https://domain.com.proxy https://proxyUsername:[email protected]:port
你可以在这里看到更多:
对于同步问题GitHub:
Ctrl+Alt+S
并转到 GitHub
部分(不是 Git
)。Clone git repositories using ssh
复选框。