【问题标题】:can't git push with the current i.p address,what to do?不能用当前的ip地址git push,怎么办?
【发布时间】:2018-12-29 11:37:03
【问题描述】:

当我 git push -u origin master 说它不能访问一些旧的 IP 地址 18.217.76.112:8080 但我现在使用 3.17.37.46 这个 IP,它不能用这个访问,不能推送怎么办?

【问题讨论】:

    标签: git push


    【解决方案1】:

    在命令git push -u origin master中,origin是远程url的别名。运行git remote -v 看看它是什么。它可能类似于http://18.217.76.112:8080/some/repo.git。你可以试试:

    git push -u http://3.17.37.46:8080/some/repo.git master
    

    git remote set-url origin http://3.17.37.46:8080/some/repo.git
    git push -u origin master
    

    git remote add new http://3.17.37.46:8080/some/repo.git
    git push -u new master
    

    第一个解决方案是一次性的。第二个更新 origin 一个新的 url。第三个创建一个新的遥控器。

    【讨论】:

      猜你喜欢
      • 2015-05-15
      • 2011-05-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-12
      • 2011-08-28
      • 2016-06-16
      • 1970-01-01
      相关资源
      最近更新 更多