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

相关推荐
是一个Bug8 小时前
Agent(智能体)应用 的入门学习路径
学习·机器学习
2301_809051148 小时前
Linux 网络编程 学习笔记
linux·网络·学习
eggcode9 小时前
【Qt学习】Linux(ARM架构)在线安装Qt6.x
linux·qt·学习·arm
鹏北海-RemHusband10 小时前
Go 语言进阶笔记 — 面向 JS/TS 前端开发者
笔记·golang
_李小白10 小时前
【android opencv学习笔记】Day 26: 滤波算法之低通滤波与图像缩放插值
android·opencv·学习
Bechamz11 小时前
大数据开发学习Day43
大数据·学习
Ws_11 小时前
Git + Gerrit 第二课:diff、暂存区与撤销修改
git
snowjlz12 小时前
鸿蒙版SVN来了!!!
git·svn·版本控制
nnsix12 小时前
Unity QFramework ResKit、UIKit 笔记
笔记