在用git上传文件到仓库中出现了2个问题
第一个问题:
![](https://i-blog.csdnimg.cn/direct/d916aba608de4bac9b4beca602f6d92d.png)
需要修改git的代理端口与电脑自己的代理服务器设置中的端口和VPN的端口保持一致,
比如我的端口是7897,就设置
git config --global http.proxy http://127.0.0.1:7897
git config --global https.proxy http://127.0.0.1:7897
配置好后,查看git配置
git config --global --edit
第二个问题
![](https://i-blog.csdnimg.cn/direct/cec32caafd1d4830ab7e36f64c47fd8e.png)
修改.git/config中的url
将
[remote "origin"]
url = https://github.com/git的用户名/项目名称
的url改为
url = https://git的用户名@github.com/git的用户名/项目名称
再push
最后就解决了
参考资料: