Github地址修改后,修改项目仓库地址
如果你修改了Github的用户名,那么你之前的项目的仓库地址会改变。
Github会自动帮你对原仓库的连接进行重定向,但是对于你代码编辑器里面的地址,github并不会自动帮你重定向。
官方网站给出的步骤如下
1.打开Git Bash命令行
2.将目录切换到你当前项目的目录
3.使用git remote -v 查看现在的远程仓库地址
4.使用set-url设置成新的远程仓库地址
5.查看验证是否修改成功
Switching remote URLs from SSH to HTTPS
Open Git Bash.
Change the current working directory to your local project.
List your existing remotes in order to get the name of the remote you want to change.
$ git remote -v > origin git@github.com:USERNAME/REPOSITORY.git (fetch) > origin git@github.com:USERNAME/REPOSITORY.git (push)
Change your remote's URL from SSH to HTTPS with the
git remote set-url
command.$ git remote set-url origin https://github.com/USERNAME/REPOSITORY.git
Verify that the remote URL has changed.
$ git remote -v # Verify new remote URL > origin https://github.com/USERNAME/REPOSITORY.git (fetch) > origin https://github.com/USERNAME/REPOSITORY.git (push)
The next time you git fetch
, git pull
, or git push
to the remote repository, you'll be asked for your GitHub username and password.
- If you have two-factor authentication enabled, you must create a personal access token to use instead of your GitHub password.
- You can use a credential helper so Git will remember your GitHub username and password every time it talks to GitHub.
Github地址修改后,修改项目仓库地址相关推荐
- git修改当前项目仓库地址的三种方法
一.前言 最近公司将gitlab整体迁移了,换了新的地址,虽然在迁移的时候将相关分支信息.代码拷过去了:但是我们开发人员在迁移过程中也会有新的代码产出:或者由于项目原因,没有及时更新地址,造成大量新的 ...
- git 查看当前仓库地址以及设置新的仓库地址
1.查看当前仓库地址 git remote show origin 2.设置新的仓库地址 git remote set-url origin "新的仓库地址"
- maven修改为阿里巴巴的仓库地址
在maven目录下找到conf文件夹下的settings.xml文件,在mirrors的子节点添加以下配置 <mirror><id>nexus-aliyun</id> ...
- aspx文件修改后的项目更新
文件扩展名 用途及说明 Global.asax ASP.NET系统环境设置文件,相当与ASP中的Global.asa. .aspx 內含ASP程序代码的文件,如同過去的.asp,浏览器可执行此 ...
- Android开发之修改项目的仓库地址亲测有效
很简单: 直接找到你项目git文件夹下面的config文件里面的url即可:如下图: 第一步: 第二步: 第三步: 修改里面的url仓库地址: 再介绍一种最简单的修改办法:Windows和Mac通用 ...
- 将Maven仓库地址修改为阿里云的仓库地址
<mirror><id>nexus-aliyun</id><mirrorOf>*</mirrorOf><name>Nexus a ...
- 前端VSCode修改Git远程仓库地址链接
https://blog.csdn.net/weixin_42870215/article/details/111470606 vscode中修改/重置gitlab远程仓库地址 一.更换git远程仓库 ...
- IDEA 修改远程仓库地址
只有简单的几个步骤: 1.删除现有的远程仓库地址 (备注仓库名称一般默认是origin,可根据实际情况修改) git remote rm origin 2.重新添加远程仓库地址(仓库名称默认origi ...
- git 修改仓库地址
1. 通过git config 修改用户名和邮箱(无改动可跳过此步骤) git config user.name '' # git config --global user.name ''git c ...
最新文章
- 一个爬虫的故事:这是人干的事儿?
- Scala多特质混入时的执行顺序
- 《51单片机应用开发从入门到精通》——2.6 中断控制功能的作用
- 1-100之间的奇数
- php 数组对比 unset,如何区分PHP中unset,array_splice的区别
- idea引入外部jar,运行项目不报错,使用maven打war包install/package时报程序包不存在等
- Python 进阶 —— 使用修饰器执行函数的参数检查
- 从移动硬盘安装计算机系统文件,手把手教你如何使用移动硬盘安装电脑系统
- 算法——排序——堆排序图解动画
- c语言中 cos函数图像,cos图像(cos函数的图像)
- Oracle Statistic 统计
- 机器学习深度学习教程
- ios ping服务器
- 蓝牙音箱方案选用及设计注意
- RSA 非对称加密算法简述
- SPI 测试程序sja1105
- 2021年安全员-B证报名考试及安全员-B证考试报名
- 手把手教你逆向微信之朋友圈小视频转发(上)
- pc端微信内置浏览器不支持replaceAll方法
- 国网GIM设备三维模型要求细则 - 交流断路器