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

相关推荐
自不量力的A同学13 分钟前
ionet 25.2 发布
笔记
云闲不收25 分钟前
AI编程系列——git-worktree并行开发
git·ai编程
YJlio26 分钟前
桌面工具学习笔记(11.4):BgInfo + Desktops + ZoomIt 组合拳——演示与排障环境一键到位
笔记·学习·自动化
玩具猴_wjh30 分钟前
12.15 学习笔记
笔记·学习
秦时明月天明32 分钟前
GitLab SSH Key 过期:git pull failed : remote your ssh key has expired
git·ssh·gitlab
shenghaide_jiahu33 分钟前
数学分析简明教程——6.3
学习
三川69838 分钟前
AVL树的学习
数据结构·学习·算法
Da Da 泓1 小时前
多线程(四)【线程安全问题】
java·开发语言·jvm·学习·安全·多线程·线程安全问题
福尔摩斯张1 小时前
TCP协议深度解析:从报文格式到连接管理(超详细)
linux·c语言·网络·c++·笔记·网络协议·tcp/ip
羽沢311 小时前
一些css属性学习
前端·css·学习