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

相关推荐
传奇开心果编程18 分钟前
【Rust入门知识点学与练】第35课:工具链与反馈环——先学会读编译器在说什么
开发语言·学习·rust
优化Henry1 小时前
学习笔记之关于MME不通问题归纳
运维·网络·学习·5g·信息与通信
M78佐菲9 小时前
51单片机学习笔记:ds18b20要点整理
linux·笔记·嵌入式硬件·学习·51单片机
高亦真9 小时前
今天是学习嵌入式的第37天
linux·学习·算法
蒸蒸yyyyzwd11 小时前
从面经中学到的三件事
c++·笔记
泡泡鱼(敲代码中)12 小时前
Python 字符串 str 完整学习笔记
python·学习
IT小白杨13 小时前
社媒多账号运营的环境隔离:一张图谱模型,解释清“为什么换IP还是被连坐“
经验分享·笔记·矩阵·指纹浏览器
kyrie_sakura13 小时前
python学习笔记15 -- Anaconda,Jupyter,numpy
python·学习·jupyter·numpy
zho_uzhou15 小时前
Git入门概念
git
PC2005-cloud16 小时前
Rust学习笔记:控制流——if、loop、while、for与match
笔记·学习·rust