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

相关推荐
Stream_Silver3 分钟前
【Agent学习笔记2:深入理解Function Calling技术:从原理到实践】
笔记·python
Hacker_Z&Q36 分钟前
CSS 笔记2 (属性)
前端·css·笔记
丝斯20111 小时前
AI学习笔记整理(67)——大模型的Benchmark(基准测试)
人工智能·笔记·学习
whale fall1 小时前
2026 年 1-3 月雅思口语完整话题清单(1-4 月通用最终版)
笔记·学习
xian_wwq1 小时前
【学习笔记】对网络安全“三化六防挂图作战”的理解与思考
笔记·学习·三化六防
三伏5222 小时前
Cortex-M3权威指南Cn第十章——笔记
笔记·单片机·嵌入式硬件·cortex-m3
AI视觉网奇2 小时前
metahuman 购买安装记录
笔记·学习·ue5
koo3642 小时前
pytorch深度学习笔记19
pytorch·笔记·深度学习
知识即是力量ol2 小时前
研发实战:Git 规范化开发全流程指南
git·gitee·github
历程里程碑2 小时前
Linux 17 程序地址空间
linux·运维·服务器·开发语言·数据结构·笔记·排序算法