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

相关推荐
chushiyunen22 分钟前
阿里云部署dify笔记
笔记·阿里云·云计算
大邳草民29 分钟前
Python 对象模型与属性访问机制
开发语言·笔记·python
kinl201842 分钟前
cs2385_note5 (lec18-lec19) Variational Inference & Control as Inference
笔记
red_redemption1 小时前
自由学习记录(165)
学习
智者知已应修善业2 小时前
【51单片机非精准计时2个外部中断启停】2023-5-29
c++·经验分享·笔记·算法·51单片机
仲芒2 小时前
[24年单独笔记] MySQL 中的简单查询搜索示例
笔记·mysql
Oll Correct2 小时前
实验十六:路由环路问题
网络·笔记
我登哥MVP2 小时前
【Spring6笔记】 - 12 - 代理模式
java·spring boot·笔记·spring·代理模式·aop
我命由我123452 小时前
U 盘里出现的文件 BOOTEX.LOG
运维·服务器·经验分享·笔记·学习·硬件工程·学习方法
Gary Studio2 小时前
ZVS原理
学习