坚持推进,没有任何反应

时间:2013-06-16 02:53:35

标签: git github git-push git-clone

我以前使用过git没有任何问题,但突然间我无法推送克隆。 当我使用这个命令时,没有任何反应,甚至没有错误,所以我必须按 ctrl + c 或者只是关闭git窗口。
我用这个简单的命令推送:

git push origin master

还尝试使用 -u 参数。

  1. 我在防火墙上打开了端口22,没有运气
  2. 我同时使用http和ssh,再次没有运气
  3. 我安装了新版本的git,没有运气
  4. 那么我可以做些什么来解决这个问题?

    更新

    我在虚拟机上安装了一个新的win xp并测试了推送的东西,结果和以前一样,所以可能是我的网络连接有问题。

    任何想法?

9 个答案:

答案 0 :(得分:3)

首先,ssh access recently存在一些问题:

  

我们目前正在研究其中一个文件服务器对上的SSH访问问题。少数存储库可能会受到影响。

其次,您需要尝试使用https,而不是http:

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

第三,git push -u origin master仅适用于第一次推送(之后,仅git push就足够了:有关详情,请参阅“Why do I need to explicitly push a new branch?

如果推送或克隆问题仍然存在,那么您需要联系GitHub支持以了解更多信息。

答案 1 :(得分:1)

事实证明,根本原因可能是底层网络设备/驱动程序。尝试重新启动计算机;或者作为解决方法,将以下内容添加到您的~/.ssh/config中:

Host *
IPQoS lowdelay throughput

答案 2 :(得分:0)

添加

BufferedImage img = new BufferedImage(screenWidth, screenHeight, BufferedImage.TYPE_INT_RGB); Graphics2D g2d = img.createGraphics(); for(int i = 0; i < arrayList.size()-1;){ for(int j = 0; j < arrayList2.size()-1;){ g2d.setColor(col); g2d.setStroke(new BasicStroke(1)); g2d.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.drawLine(arrayList.get(i), arrayList2.get(j), arrayList.get(i+1), arrayList2.get(j+1)); i++; j++; } }

之后

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

之前

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

答案 3 :(得分:0)

我搞乱了多个存储库,出于某种原因,force参数解决了这个问题。

git push --force origin master

答案 4 :(得分:0)

只是想促成这种情况发生的另一个原因:如果您要推入的遥控器安装了IP过滤器,它将闪烁而没有任何输出。就我而言,我的笔记本电脑连接了WiFi,WiFi无法通过列入白名单的IP地址进行连接。

答案 5 :(得分:0)

它可能与yout ssh客户端有关。您可以ssh登录远程服务器吗? -v详细选项在这里非常有用。

ssh -v -p PORT USER@SERVER

此处有更多详细信息:https://stackoverflow.com/a/60205342/195812

答案 6 :(得分:0)

最近我遇到了同样的问题,我按照以下步骤解决了问题

  1. 确保您输入了正确的用户名和电子邮件。

    git config --global user.name "Your Name"
    git config --global user.email "youremail@gmail.com"
    
  2. 现在运行这个命令

    git config --list
    
  3. 你会看到这样的输出

    user.name=Your Name
    user.email=youremail@gmail.com
    
  4. 终于对我有用了

答案 7 :(得分:0)

就我而言,https 连接不起作用。 更改远程源 url,不使用 https 而是使用 git

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

这个 url 可以在你的 github 或 gitlab 项目页面上找到

答案 8 :(得分:0)

这是安装的问题,可能是最新的 GIT 版本(2.32.0)。

要修复它,您必须重新安装 git 并在出现 this screen 时选择突出显示的选项。