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

相关推荐
呱呱巨基3 小时前
Linux 进程概念
linux·c++·笔记·学习
yong15858553433 小时前
2. Linux C++ muduo 库学习——原子变量操作头文件
linux·c++·学习
老王熬夜敲代码4 小时前
C++中的atomic
开发语言·c++·笔记·面试
IDIOT___IDIOT4 小时前
KNN and K-means 监督与非监督学习
学习·算法·kmeans
Rousson5 小时前
硬件学习笔记--91 TMR型互感器介绍
笔记·学习
Ingsuifon5 小时前
yolov5模型迁移笔记
笔记·yolo
cc蒲公英5 小时前
idea git命令初次创建项目至远程
git
前端 贾公子5 小时前
Vue响应式原理学习:基本原理
javascript·vue.js·学习
Slaughter信仰6 小时前
图解大模型_生成式AI原理与实战学习笔记前四张问答(7题)
人工智能·笔记·学习
高兴就好(石6 小时前
git将远程的master分支的commit都拉取到本地
git