Stuck at push, nothing happens

断了今生、忘了曾经 提交于 2019-12-05 14:28:44
VonC

First, there was some issue with ssh access recently:

We are currently investigating SSH access problems on one of our fileserver pairs. A small number of repositories may be affected.

Second, you would need to try and use https, not http:

git remote set-url origin https://github.com/username/reponame

Third, the git push -u origin master is only for the first push (after that, git push alone is enough: see "Why do I need to explicitly push a new branch?" for more)

If the push or clone issue still persists, then you need to contact GitHub support to know more about this.

Add

git remote set-url "https://github.com/targetusername/targetrepo"

after

git remote add "https://github.com/targetusername/targetrepo"

and before

git push -u origin master

I had messed with multiple repositories and for some reason, the force argument solved the problem.

git push --force origin master

Just wanted to contribute yet another reason this can happen: if the remote you're pushing to has IP filters in place, it will blink with no output. In my case, my laptop was connected with WiFi which was not connecting through a whitelisted IP address.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!