推送到 Github 时 Git push 挂起?

标签 git github cygwin freeze git-push

每次我尝试推送到 github 时,Git push 都会挂起。我正在使用 Cygwin 和 Windows 7。Git 可以很好地在本地跟踪分支、提供状态、设置全局 user.name 和 user.email 并允许提交。

我还是新手,正在学习。

我输入 git pushgit push origin mastergit push -u origin master ,除了一个需要我的空白行,我什么也没得到到 ctl-c 以获得提示。

ssh-keygen -t rsa -C "me@example.com" 要求我提供文件名并挂起

git push heroku master 挂起

$ git status 返回 在分支 master 上没有要提交,工作目录干净

$ git pull 返回已经是最新的

$ 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

更新:使用 SSH url 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。安装了适用于 Windows GUI 应用程序的 Github,我能够推送它。但是这个应用程序的功能有限,迫使我离开我的 Cygwin 窗口进入另一个应用程序,然后迫使我进入 Windows 命令提示符以获得完整的功能,我认为我已经通过使用 Cygwin 逃脱了。

花了很多很多时间试图解决这个问题,它之前工作得很好,谢谢。

更新 4/2014:我重建了我的整个机器 Win 7、Cygwin 等,现在一切正常

最佳答案

重新启动您的 ssh 代理!

killall ssh-agent; eval `ssh-agent`

关于推送到 Github 时 Git push 挂起?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16906161/

相关文章:

rubygems - ffi gem 无法在 Cygwin 上构建 native 扩展

git - 如何维护 git 中的私有(private)更改?

github - 中间人和Github页面

c++ - 在 Cygwin 上链接 Boost 库

git - MS Visual Studio + gitolite 或 github 通过 ssh

Github post-receive hook自动 pull 回滚

linux-kernel - Cygwin:Linux 内核 make clean 不工作

git - 如何git rm一个名称以 ':'开头的文件

git - 如何使用别名访问 Jenkins 中的远程 Git 存储库?

使用双因素身份验证通过 https 从 GitHub 克隆 Git