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

相关推荐
吃好睡好便好38 分钟前
泰戈尔的诗歌7
学习·生活
RainCity1 小时前
Java Swing 自定义组件库分享(十三)
java·笔记·后端
江畔柳前堤1 小时前
第13章:docker生产环境部署实战
运维·git·docker·容器·代码复审
星夜夏空991 小时前
C++学习(2) —— 类与对象基础
开发语言·c++·学习
-To be number.wan2 小时前
数据库系统 | 数据库安全与完整性
数据库·学习
czysoft2 小时前
se被限速
科技·学习·it·技术·魔法·先进·领先
子不语1803 小时前
从0开始学习S7-1200+ET200SP(3)——两台S7-1200通过TCP连接
网络协议·学习·tcp/ip
llllliznc4 小时前
LLM 学习笔记 Day 5:Agent 核心组件——Planner、Memory 与 Reflection
笔记·学习
risc1234564 小时前
“解决了什么痛点”与“为什么有这个东西”的关系?
笔记
hj2862514 小时前
Docker 容器化技术标准化笔记
java·笔记·docker