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

相关推荐
电子云与长程纠缠5 小时前
Godot学习05 - 播放与分离FBX动画
学习·游戏引擎·godot
蒸蒸yyyyzwd6 小时前
day3学习笔记
笔记·学习
red_redemption7 小时前
自由学习记录(143)
学习
楼田莉子8 小时前
MySQL数据库:MySQL的数据类型
数据库·学习·mysql
小陈phd8 小时前
系统架构师学习笔记(三)——计算机体系结构之存储系统
笔记·学习·系统架构
Rsun045519 小时前
AI智能体学习路线
人工智能·学习
feasibility.9 小时前
SSH Agent Forwarding 与 tmux 排障笔记
linux·运维·服务器·经验分享·笔记·ssh
charlie1145141919 小时前
通用GUI编程技术——Win32 原生编程实战(十六)——Visual Studio 资源编辑器使用指南
开发语言·c++·ide·学习·gui·visual studio·win32
知识分享小能手9 小时前
MongoDB入门学习教程,从入门到精通,MongoDB查询(4)
数据库·学习·mongodb
weixin_409383129 小时前
godot等轴视角tilemaplayer的学习 isocheric的素材xy大小怎么调
学习·游戏引擎·godot