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

相关推荐
David猪大卫4 小时前
【C++修炼】map 和 set 的使用
c语言·开发语言·数据结构·c++·经验分享·笔记·学习
HPtiger4 小时前
C++ 入门笔记:从 C 到 C++ 的核心过渡(命名空间、输入输出、缺省参数、重载、引用、内联)
c语言·c++·学习
星恒随风5 小时前
MySQL 从零入门(三):表的约束详解
linux·服务器·数据库·笔记·mysql
fengci.6 小时前
CTF2MISC中等部分
开发语言·前端·学习
YueTann7 小时前
mgtv5th-baseline学习
学习
kuroomi8 小时前
Git入门
git·kubernetes
daliucheng8 小时前
lazygit 上手:日常 git 操作一篇讲完
git
蒸蒸yyyyzwd9 小时前
从后端面经学到的 3 个知识
笔记·学习
17岁的勇气9 小时前
Unity Shader unity文档学习笔记(二十二):shader变体
笔记·学习·unity
坤坤子吖10 小时前
Linux网络编程:自定义应用层协议与 JSON 序列化
linux·服务器·网络·c++·笔记·json