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

相关推荐
xhyu6113 小时前
【学习笔记】推荐系统 (4.召回:Deep Retrieval、其他召回通道、曝光过滤)
笔记·学习
小帅学编程13 小时前
Python学习
开发语言·python·学习
CappuccinoRose14 小时前
HTML语法学习文档 - 汇总篇
前端·学习·html5
桂花很香,旭很美14 小时前
Anthropic Agent 工程实战笔记(一)架构与选型
笔记·架构·language model
Aliex_git14 小时前
Sentry 私有部署和配置笔记
笔记·学习·sentry
qq_242188633214 小时前
金融AI反欺诈系统构建指南
人工智能·笔记·金融·课程设计
四谎真好看15 小时前
SSM学习笔记(SpringBoot篇)
spring boot·笔记·学习·学习笔记·ssm
学编程的闹钟15 小时前
E语言子程序调用详解
学习
郝学胜-神的一滴15 小时前
Effective Modern C++ 条款40:深入理解 Atomic 与 Volatile 的多线程语义
开发语言·c++·学习·算法·设计模式·架构
追光少年332215 小时前
React学习:ES6
学习·react.js·es6