代码提交不上github

122 阅读1分钟

在这里插入图片描述 ##都好好的,为什么一直提交不上?一度怀疑##有问题 然后在网上翻到一个解决方案,也测试成功,故拿出来分享分享


解决方案

ps:我的本地环境是windows


  • 查看git的全局代理

    git config --global http.proxy #http代理
    git config --global https.proxy #https代理
    

    我本地运行后是空白,如果不是空白的话,要先取消掉代理

    git config --global --unset http.proxy #取消http代理
    git config --global --unset https.proxy #取消https代理
    
  • 打开winows的设置 在这里插入图片描述 在这里插入图片描述 在这里插入图片描述 此处看到地址:127.0.0.1、端口:10809 然后需要将我们的git代理地址设置为它

    git config --global http.proxy http://127.0.0.1:10809
    

    这样就能正常提交代码了 在这里插入图片描述