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

相关推荐
im_AMBER4 分钟前
Web 开发 30
前端·笔记·后端·学习·web
试试勇气1 小时前
Linux学习笔记(八)--环境变量与进程地址空间
linux·笔记·学习
蒙奇D索大1 小时前
【数据结构】考研数据结构核心考点:平衡二叉树(AVL树)详解——平衡因子与4大旋转操作入门指南
数据结构·笔记·学习·考研·改行学it
andwhataboutit?2 小时前
Docker Compose学习
学习·docker·容器
郭庆汝2 小时前
自然语言处理笔记
笔记·自然语言处理·easyui
二进制怪兽2 小时前
[笔记] 驱动开发:Virtual-Display-Driver编译过程
笔记
ouliten2 小时前
cuda编程笔记(28)-- cudaMemcpyPeer 与 P2P 访问机制
笔记·cuda
im_AMBER2 小时前
数据结构 04 栈和队列
数据结构·笔记·学习
尘似鹤2 小时前
微信小程序学习(六)--多媒体操作
学习·微信小程序·小程序
Jammingpro3 小时前
【Git版本控制】Git初识、安装、仓库初始化与仓库配置(含git init、git config与配置无法取消问题)
java·git·elasticsearch