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

相关推荐
武昌库里写JAVA4 分钟前
iview组件库:关于分页组件的使用与注意点
java·vue.js·spring boot·学习·课程设计
中微子13 分钟前
📝 终极Git Commit Message规范指南:写出专业级提交记录
git·github
人有一心1 小时前
【论文阅读】多任务学习起源类论文《Multi-Task Feature Learning》
论文阅读·学习
HaiQinyanAN1 小时前
【学习笔记】虚函数+虚析构函数
c++·笔记·学习
溜达哥1 小时前
git commit 执行报错 sh: -/: invalid option
前端·javascript·git
虾球xz1 小时前
CppCon 2015 学习:Give me fifteen minutes and I’ll change your view of GDB
开发语言·c++·学习
Sleepless_斑马2 小时前
【FFmpeg学习(2)】视频概念
学习·ffmpeg·音视频
brooknew2 小时前
从中科大镜像获取linux内核5.10.168的git方法
linux·git
止于怠2 小时前
学习时困了怎么办
学习·解困
qq_29494019103 小时前
清新文艺手绘学习教育培训竞标汇报PPT模版分享
学习·ppt模版·清新ppt·通用ppt模版