git Push 挂起并且不执行任何操作
我是 git 的新手,正在对其进行测试。我已经能够克隆朋友存储库,进行小的本地更改并提交。
我现在想测试将本地更改推送到远程存储库,但不幸的是,当我尝试执行推送时
$ git push <我的朋友远程存储库
>
<---- 挂在这里等待..我通过 ctr-c 突破
这里是一些显示我当前状态的信息,
$ git Remote show origin
获取 URL:git://codaset.com/nickbmarine/nickspix.git
推送网址:git://codaset.com/nickbmarine/nickspix.git
HEAD 分支:master
远程分支机构:
重构跟踪
主跟踪
为“git pull”配置的本地分支:
主站与远程主站合并
为“git Push”配置的本地引用:
master 推送到 master(可快进)
有什么想法吗?
I'm new to git and testing it out. I've been able to clone a friends repository make small local changes and commit.
I'd like to now test pushing my local changes to the remote repository but unfortunately when I try to do a push
$ git push <my friends remote repository
>
<---- hangs here waiting ..I break out by ctr-c
Here is some info showing my current status,
$ git remote show origin
Fetch URL: git://codaset.com/nickbmarine/nickspix.git
Push URL: git://codaset.com/nickbmarine/nickspix.git
HEAD branch: master
Remote branches:
Refactor tracked
master tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
master pushes to master (fast-forwardable)
Any idea's?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
尝试使用 http:// 而不是 git:// 推送到 git。如果它以这种方式工作,则可能是您的路由器阻塞了 git 端口。
Try pushing to git using http:// instead git://. If it works this way probably your router is blocking the git port.
当我在 VirtualBox 中从命令提示符 (Win 8.1) 运行 GIT 时,遇到了完全相同的问题。我发现,如果您只需按键盘上的某个键,系统就会提示您输入用户名,然后一切就OK了。看来提示被卡住了,等待键盘输入。
I had this exact same problem when running GIT from a command prompt (Win 8.1) within a VirtualBox. I found that if you simply press a key on the keyboard that you will be prompted for your username, and then all is ok. It seems that the prompt was stuck, awaiting keyboard input.
在当前分支上,使用以下命令更新您的配置
$ git config --global user.email "[电子邮件受保护]"
这对我有用!
On your current branch, use the following command to update your config
$ git config --global user.email "[email protected]"
This worked for me!
如果上述方法不起作用,则可能是因为您需要(配置)您的姓名和电子邮件,然后才能执行(推送)到在线 github 存储库。您可以提交(配置)您的姓名和名称输入以下 2 个命令,通过 Git Bash 命令行发送电子邮件:
► 此后,您可以运行 [$ git Push] 上传更改
If the above doesn't work, then its likely because you need to (config) your name and email before you can do the (push) to the online github repository. You can submit (config) your name & email through the Git Bash command line by entering these 2 commands:
► After this, you can then run [$ git push] to upload the changes
对我来说,这个问题是由网络引起的。当我更改为不同的网络并再次尝试时,它成功了。 Git 服务器位于 Amazon Lightsail 上,该服务器有时会拒绝来自某些网络的连接。
For me, this issue was caused by the network. When I changed to a different network and tried again, it worked. Git server was on Amazon Lightsail, which sometimes refuses connection from certain networks.
我在 Github Desktop 上遇到了这个问题。推送将导致应用程序挂起并显示以下消息:
最终我通过从 Github 桌面删除存储库然后将其添加回来解决了这个问题。
I had this issue on Github Desktop. Pushing would cause the app to hang with this message:
Eventually I fixed this by removing the repo from Github desktop and then adding it back.