git 问题解决记录

在用git上传文件到仓库中出现了2个问题

第一个问题:

需要修改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

第二个问题

修改.git/config中的url

将
[remote "origin"]
url = https://github.com/git的用户名/项目名称
的url改为
url = https://git的用户名@github.com/git的用户名/项目名称

再push

最后就解决了

参考资料:

1.解决git push 中remote: Permission to xxxxx.git denied to xxx. fatal: unable to acce_remote: user permission denied fatal: unable to ac-优快云博客

2.https://zhuanlan.zhihu.com/p/648164862

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值