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

相关推荐
DeepModel5 小时前
通俗易懂讲透 Q-Learning:从零学会强化学习核心算法
人工智能·学习·算法·机器学习
handler016 小时前
从零实现自动化构建:Linux Makefile 完全指南
linux·c++·笔记·学习·自动化
安小牛6 小时前
Android 开发汉字转带声调的拼音
android·java·学习·android studio
Hello_Embed7 小时前
嵌入式上位机开发入门(二十六):将 MQTT 测试程序加入 APP 任务
网络·笔记·网络协议·tcp/ip·嵌入式
SiYuanFeng7 小时前
新手学Git:如何把本地 Git 项目上传到 GitHub
git·github
不会编程的懒洋洋7 小时前
C# Task async/await CancellationToken
笔记·c#·线程·面向对象·task·同步异步
仙女修炼史7 小时前
CNN的捷径学习Shortcut Learning in Deep Neural Networks
人工智能·学习·cnn
亚空间仓鼠8 小时前
网络学习实例:网络理论知识
网络·学习·智能路由器
前端若水8 小时前
git回退并合并分支操作
git
薛定e的猫咪9 小时前
多智能体强化学习求解 FJSP 变体全景:动态调度、AGV 运输、绿色制造与开源代码导航
人工智能·学习·性能优化·制造