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

相关推荐
子辰ToT23 分钟前
LearnOpenGL——PBR(三)漫反射辐照度
笔记·图形渲染·opengl
risc12345626 分钟前
认知神经科学
笔记
菩提小狗33 分钟前
第18天:信息打点-APP资产&知识产权&应用监控&静态提取&动态抓包&动态调试_笔记|小迪安全2023-2024|web安全|渗透测试|
笔记·安全·web安全
xhyu611 小时前
【学习笔记】推荐系统 (2.召回:ItemCF、Swing、UserCF)
笔记·学习
【数据删除】3481 小时前
计算机复试学习笔记 Day24【补】
笔记·学习
weixin_448119941 小时前
Datawhale Easy-Vibe 202602 第4次笔记
笔记·深度学习
日更嵌入式的打工仔1 小时前
LDR/STR
笔记
EmmaXLZHONG1 小时前
分布式系统概念与设计笔记(Notes of Distributed Systems Concepts and Design)
笔记·分布式·网络协议·计算机网络
DoogalStudio1 小时前
DevMind插件设计方案产品需求文档
人工智能·笔记
学历真的很重要1 小时前
【系统架构师】第三章 数据库系统知识 - 数据库基础到关系代数(详细版)
数据库·学习·职场和发展·系统架构·系统架构师