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

相关推荐
修己xj12 小时前
Gogs: 打造属于你自己的轻量级 Git 服务
git
AI机器学习算法13 小时前
《动手学深度学习PyTorch版》笔记
人工智能·学习·机器学习
贺一航【Niki】13 小时前
【学习笔记】杂乱知识
笔记·学习
Mediary14 小时前
Git本地忽略文件夹,只拉取目标文件夹
git
白雪茫茫14 小时前
监督学习、半监督学习、无监督学习算法详解
python·学习·算法·ai
つ安静与叛逆的小籹人14 小时前
小红书API:通过笔记ID获取笔记详情数据教程
笔记·python
ClutchoQ16 小时前
【你指的API是哪个API?软件工程师跨服聊天实录】
笔记·其他
二哈赛车手18 小时前
新人笔记---Spring AI的Advisor以及其底层机制讲解(涉及源码),包含一些遇见的Spring AI的Advisor缺陷问题的解决方案
java·人工智能·spring boot·笔记·spring
MY_TEUCK18 小时前
【git工具篇】Git 常用实战手册:从基础命令到分支冲突解决(开发实战版)
大数据·git
red_redemption19 小时前
自由学习记录(181)
学习