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-CSDN博客

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

相关推荐
暴风游侠1 小时前
linux知识点-内核参数相关
linux·运维·服务器·笔记
Galloping-Vijay6 小时前
Claude Code 使用笔记
笔记
旖旎夜光6 小时前
多态(11)(下)
c++·学习
极市平台7 小时前
骁龙大赛-技术分享第5期(上)
人工智能·经验分享·笔记·后端·个人开发
dyxal7 小时前
Git时光机:一招回到过去——`git checkout -- .`详解
git
全栈陈序员7 小时前
【Python】基础语法入门(十七)——文件操作与数据持久化:安全读写本地数据
开发语言·人工智能·python·学习
啄缘之间8 小时前
11. UVM Test [uvm_test]
经验分享·笔记·学习·uvm·总结
RisunJan8 小时前
【行测】类比推理-自称他称全同
学习
wan55cn@126.com8 小时前
人类文明可通过技术手段(如加强航天器防护、改进电网设计)缓解地球两极反转带来的影响
人工智能·笔记·搜索引擎·百度·微信
石像鬼₧魂石8 小时前
Termux ↔ Windows 靶机 反向连接实操命令清单
linux·windows·学习