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

相关推荐
●VON11 小时前
HarmonyKit | 鸿蒙开发协作:如何为 HarmonyKit 贡献一个新的工具
git·华为·harmonyos·鸿蒙
枕星而眠11 小时前
Git仓库基础用法
大数据·git·后端·elasticsearch·全文检索
Linging_2411 小时前
基于Langchain得AI Agent相关知识学习
人工智能·学习·langchain
浩瀚地学12 小时前
【面试算法笔记】0106-数组-区间和
笔记·算法·面试
minglie120 小时前
高等代数试题
学习
Xiaofeng369321 小时前
GPT-5.6 发布后,我用了一个周末重新规划学习路线图
gpt·学习
其实防守也摸鱼1 天前
运维--怎么看接口的请求和返回
运维·学习·网络安全·网络攻击模型·burpsuite·攻防对抗·蓝队
酷讯网络_2408701601 天前
区块粮仓宠物NFT源码区块狗/抢购转让预约区块投资理财系统
学习·开源·宠物
疯狂打码的少年1 天前
【软件工程】软件开发模型:增量模型与迭代模型
笔记·软件工程
Generalzy1 天前
从本地 Demo 到生产级检索:Milvus 学习笔记(3)
笔记·学习·milvus