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

相关推荐
鱼鳞_1 分钟前
Java学习笔记_Day19
java·笔记·学习
浮游本尊2 分钟前
React 18.x 学习计划 - 第十五天:GraphQL 与实时应用实战
学习·react.js·graphql
KaneLogger9 小时前
OpenCode 操作手册
git
木子小喵9 小时前
通俗讲解Git安装每一步!!
git
IOT那些事儿11 小时前
TortoiseGit拉取开源子仓库失败
git·ssh·tortoisegit·submodule
禹中一只鱼11 小时前
【力扣热题100学习笔记】 - 哈希
java·学习·leetcode·哈希算法
不想看见40412 小时前
Git的多种仓库选择与推荐
git
SteveSenna12 小时前
项目:Trossen Arm MuJoCo
人工智能·学习·算法
m0_7473041612 小时前
GNN学习
学习
Sagittarius_A*13 小时前
监督学习(Supervised Learning)
人工智能·学习·机器学习·监督学习