当我使用Git命令"git pull"来更新我的存储库时,它失败了,如下所示:致命:无法访问'...':从服务器清空回复.
我尝试使用GitHub应用程序,但提醒:
Cloning into 'renren_mobile'...
warning: templates not found /Applications/GitHub.app/Contents/Resources/git/templates
2014-11-23 13:58:57.975 GitHub for Mac Login[659:11891] AskPass with arguments: (
"/Applications/GitHub.app/Contents/MacOS/GitHub for Mac Login",
"Username for 'https://github.com': "
)
2014-11-23 13:58:58.032 GitHub for Mac Login[660:11915] AskPass with arguments: (
"/Applications/GitHub.app/Contents/MacOS/GitHub for Mac Login",
"Password for '': "
)
fatal: unable to access '...': Empty reply from server
(128)
Run Code Online (Sandbox Code Playgroud)
小智 31
我解决了这个问题.我认为这可能是因为https,但我不太确定.您可以将远程URL从HTTPS切换到SSH.
1.请参阅此链接了解详情:https://help.github.com/articles/changing-a-remote-s-url/
我还必须配置ssh密钥.
2.关注此:https://help.github.com/articles/generating-ssh-keys/
我遇到这个问题是因为我更换了我的mac,但是我做了数据传输,我认为这可能是因为关键原因.
Gan*_*zy' 22
我一直陷入这个问题,直到我注意到我没有登录我的VPN.
说明:
1)如果您已为VPN配置代理,则需要登录VPN才能使用代理.
2)在VPN外部使用unset命令:
git config --global --unset http.proxy
并记住在VPN内设置代理.
希望这个评论可以节省3个小时的时间,我毫无意义地试图阅读变通方法
Mar*_*rco 18
在Windows上:
转到Win - >控制面板 - >凭据管理器 - > Windows凭据
搜索github地址并将其删除.
然后尝试执行:
git push -u origin master
Run Code Online (Sandbox Code Playgroud)
Windows将再次询问您的git凭据,放置正确的凭据,就是这样.
小智 12
Try, this
git config --global --unset http.proxy
git config --global --unset https.proxy
izi*_*tti 11
我尝试了一些这里列出的技巧,没有任何运气.看起来我的终端模拟器(iTerm2)或会话缓存了一些东西.当我从一个新的终端选项卡运行命令时,问题就消失了.
如果取消设置使用
git config --global --unset-all https.proxy
Run Code Online (Sandbox Code Playgroud)
不适合你。
然后检查是否设置了环境变量http_proxy和https_proxy。使用此命令检查: -
env | grep -i proxy
Run Code Online (Sandbox Code Playgroud)
如果此变量设置为 something ,那么您可以使用以下方法取消设置:-
https_proxy=""
Run Code Online (Sandbox Code Playgroud)
错误可能是,计算机保存了 git 用户名和密码,因此如果您切换到其他帐户,则会出现 403 错误。下面是解决方案
在 Windows 中
你可以在这里找到钥匙:
控制面板 > 用户帐户 > 凭据管理器 > Windows 凭据 > 通用凭据
接下来,删除 Github 密钥。
在苹果机上
在 Finder 中,搜索“钥匙串访问”应用 > 在“钥匙串访问”中,搜索 github.com > 查找 github.com 的“互联网密码”条目 > 相应地编辑或删除该条目。
归档时间: |
|
查看次数: |
175512 次 |
最近记录: |