Mat*_*ger 58 git cygwin github hang git-push
每当我尝试推送到github时,Git push都会挂起.我正在使用Cygwin和Windows 7. Git函数可以在本地跟踪分支,提供状态,设置全局user.name和user.email以及允许提交.
我还是新人,还在学习.
我输入git push,git push origin master或者git push -u origin master我得到的只是一个空白行,要求我ctl-c以获得提示.
ssh-keygen -t rsa -C "me@example.com" 问我一个文件名并挂起
git push heroku master 挂起
$ git status 回报 On branch master nothing to commit, working directory clean
$ git pull 回报 Already up to date
$ git remote -v 收益:
heroku git@heroku.com:myherokusite.git (fetch)
heroku git@heroku.com:myherokusite.git (push) origin
https://github.com/gitusername/appname.git (fetch) origin
https://github.com/gitusername/appname.git (push)
or the correct ssh remote settings are returned when trying this with ssh
Run Code Online (Sandbox Code Playgroud)
更新:使用SSH网址git@github.com:gitusername/gitrepo.git也会挂起
git remote set-url origin https://github.com/gitusername/appname.git 是正确的
更新:我可以在Windows任务管理器挂起时看到运行的git进程.
我试过了:
使用不同的互联网连接位置
在https和ssh之间切换,它就会挂起
卸载git.重新安装:https://code.google.com/p/msysgit/downloads/list
卸载git.安装了Cygwin的git
卸载git.安装Github for Windows GUI应用程序,它我能够推动.但是这个应用程序的功能有限,迫使我从我的Cygwin窗口进入另一个应用程序,然后强制我进入Windows命令提示符以获得完整的功能,我认为我已经使用Cygwin逃脱了.
花了很多很多小时试图解决这个问题,它之前完美无缺,谢谢.
更新4/2014:我重建了我的整个机器Win 7,Cygwin等,现在一切正常
for*_*oop 60
git config --global core.askpass "git-gui--askpass"
Run Code Online (Sandbox Code Playgroud)
这对我有用.可能需要3-5秒才能显示提示,只需输入您的登录凭据即可.
the*_*gin 28
有同样的问题。有点困惑,但问题是我在 root 上做了一个 git init --bare ,这意味着你将无法推送,因为你没有任何权限。相反,创建一个新用户,或者在我的例子中,我使用 Pi User 并在那里创建 git init --bare ,然后它就起作用了。
git config --global http.postBuffer 524288000
将数据 POST 到远程系统时,智能 HTTP 传输使用的缓冲区的最大大小(以字节为单位)。对于大于此缓冲区大小的请求,将使用 HTTP/1.1 和 Transfer-Encoding: chunked 来避免在本地创建大量包文件。默认值为 1 MiB,足以满足大多数请求。
Mat*_*tag 26
尝试创建一个类似的脚本~/sshv.sh将显示ssh最多:
#!/bin/bash
ssh -vvv "$@"
Run Code Online (Sandbox Code Playgroud)
允许为~/sshv.sh文件所有者执行文件:
chmod u+x ~/sshv.sh
Run Code Online (Sandbox Code Playgroud)
然后调用你git push的:
GIT_SSH=~/sshv.sh git push ...
Run Code Online (Sandbox Code Playgroud)
在我的情况下,这帮助我弄清楚我正在使用需要关闭的ssh共享连接,所以我杀死了那些ssh进程并开始工作.
Gur*_*iah 24
尝试GIT_CURL_VERBOSE = 1 git push ...可能由于代理设置而发生git将试图通过代理服务器到达github.com并且代理没有响应.使用GIT_CURL_VERBOSE = 1将显示IP地址和一些信息.你可以比较ip地址和命令输出"host www.github.com"的ip地址.如果它们不同,那么您可以制作https_proxy =""并再试一次.
bst*_*cks 23
就我而言,问题是 https 似乎不再受支持,我必须将所有来源从旧的https://github.com/username/myrepo切换到 git@github.com:username/myrepo.git。
我这样做是用
git remote set-url origin git@github.com:username/myrepo.git
Run Code Online (Sandbox Code Playgroud)
小智 14
我在 Mac 上遇到了这个问题。我的解决方案是使用以下命令终止所有 git 进程:
killall git
Run Code Online (Sandbox Code Playgroud)
希望这对某人有帮助!
Dre*_*rew 10
我有同样的问题,完全相同的症状......我正要在绝望中重建我的整个系统)).
我甚至git config --global core.askpass "git-gui--askpass"像某些人在这里尝试一样天真,但它没有用......
git push仍然冻结......
但后来我发现我的SSH代理有错误.所以我重新启动了ssh-agent和...... PROFIT
结论:当您遇到ssh连接问题时,请务必检查您的SSH代理和SSHD服务器...我很确定这是您的问题(这就是重新安装系统后它工作的原因)
重新启动您的 ssh 代理!
killall ssh-agent; eval `ssh-agent`
Run Code Online (Sandbox Code Playgroud)
如果你使用cygwin git或外部git(即github),它值得检查.
如果whereis git返回刚好/cygdrive/c/Program Files (x86)/Git/cmd/git.exe或类似的最好安装cygwin git包,这解决了我的问题.
我遇到过同样的问题。不用担心和寻找无穷无尽的复杂解决方案,只需删除 git 并重新安装它。
sudo apt-get purge git
sudo apt-get autoremove
sudo apt-get install git
Run Code Online (Sandbox Code Playgroud)
就是这样。现在应该可以使用了
我今天遇到了同样的问题,我所做的就是删除源git remote remove origin 并重新添加它git remote add origin https://github.com/username/project.git,然后我就能够成功推送。
| 归档时间: |
|
| 查看次数: |
77875 次 |
| 最近记录: |