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

相关推荐
今日无bug20 小时前
Git 提交:用全栈技术打造智能 Commit Message 生成器
git·全栈
明月_清风1 天前
拒绝盲目 Git:VS Code 神级插件 GitLens 的 9 个进效杀手锏
前端·git
goodspeed3 天前
Git Worktree:多分支并行开发的利器
git·github
齐生15 天前
iOS 知识点 - 渲染机制、动画、卡顿小集合
笔记
雮尘5 天前
让 AI Agent 高效并行开发的命令-git worktree
人工智能·git·agent
用户962377954485 天前
VulnHub DC-1 靶机渗透测试笔记
笔记·测试
南果梨6 天前
OpenClaw 完整教程!从安装到使用(官方脚本版)
前端·git·开源
齐生16 天前
iOS 知识点 - IAP 是怎样的?
笔记
tingshuo29176 天前
D006 【模板】并查集
笔记
Selicens7 天前
git批量删除本地多余分支
前端·git·后端