如果你修改了Github的用户名,那么你之前的项目的仓库地址会改变。

Github会自动帮你对原仓库的连接进行重定向,但是对于你代码编辑器里面的地址,github并不会自动帮你重定向。

官方网站给出的步骤如下

1.打开Git Bash命令行

2.将目录切换到你当前项目的目录

3.使用git remote -v 查看现在的远程仓库地址

4.使用set-url设置成新的远程仓库地址

5.查看验证是否修改成功

Switching remote URLs from SSH to HTTPS

  1. Open Git Bash.

  2. Change the current working directory to your local project.

  3. 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)
  4. 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
  5. 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 fetchgit 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地址修改后,修改项目仓库地址相关推荐

  1. git修改当前项目仓库地址的三种方法

    一.前言 最近公司将gitlab整体迁移了,换了新的地址,虽然在迁移的时候将相关分支信息.代码拷过去了:但是我们开发人员在迁移过程中也会有新的代码产出:或者由于项目原因,没有及时更新地址,造成大量新的 ...

  2. git 查看当前仓库地址以及设置新的仓库地址

    1.查看当前仓库地址 git remote show origin 2.设置新的仓库地址 git remote set-url origin "新的仓库地址"

  3. maven修改为阿里巴巴的仓库地址

    在maven目录下找到conf文件夹下的settings.xml文件,在mirrors的子节点添加以下配置 <mirror><id>nexus-aliyun</id> ...

  4. aspx文件修改后的项目更新

    文件扩展名 用途及说明  Global.asax  ASP.NET系统环境设置文件,相当与ASP中的Global.asa.  .aspx  內含ASP程序代码的文件,如同過去的.asp,浏览器可执行此 ...

  5. Android开发之修改项目的仓库地址亲测有效

    很简单: 直接找到你项目git文件夹下面的config文件里面的url即可:如下图: 第一步: 第二步: 第三步: 修改里面的url仓库地址: 再介绍一种最简单的修改办法:Windows和Mac通用 ...

  6. 将Maven仓库地址修改为阿里云的仓库地址

    <mirror><id>nexus-aliyun</id><mirrorOf>*</mirrorOf><name>Nexus a ...

  7. 前端VSCode修改Git远程仓库地址链接

    https://blog.csdn.net/weixin_42870215/article/details/111470606 vscode中修改/重置gitlab远程仓库地址 一.更换git远程仓库 ...

  8. IDEA 修改远程仓库地址

    只有简单的几个步骤: 1.删除现有的远程仓库地址 (备注仓库名称一般默认是origin,可根据实际情况修改) git remote rm origin 2.重新添加远程仓库地址(仓库名称默认origi ...

  9. git 修改仓库地址

    1. 通过git config  修改用户名和邮箱(无改动可跳过此步骤) git config user.name '' # git config --global user.name ''git c ...

最新文章

  1. 一个爬虫的故事:这是人干的事儿?
  2. Scala多特质混入时的执行顺序
  3. 《51单片机应用开发从入门到精通》——2.6 中断控制功能的作用
  4. 1-100之间的奇数
  5. php 数组对比 unset,如何区分PHP中unset,array_splice的区别
  6. idea引入外部jar,运行项目不报错,使用maven打war包install/package时报程序包不存在等
  7. Python 进阶 —— 使用修饰器执行函数的参数检查
  8. 从移动硬盘安装计算机系统文件,手把手教你如何使用移动硬盘安装电脑系统
  9. 算法——排序——堆排序图解动画
  10. c语言中 cos函数图像,cos图像(cos函数的图像)
  11. Oracle Statistic 统计
  12. 机器学习深度学习教程
  13. ios ping服务器
  14. 蓝牙音箱方案选用及设计注意
  15. RSA 非对称加密算法简述
  16. SPI 测试程序sja1105
  17. 2021年安全员-B证报名考试及安全员-B证考试报名
  18. 手把手教你逆向微信之朋友圈小视频转发(上)
  19. pc端微信内置浏览器不支持replaceAll方法
  20. 国网GIM设备三维模型要求细则 - 交流断路器

热门文章

  1. opencv_dnn模型部署学习记录
  2. 阿里云HaaS100物联网开发板学习笔记(二)硬件控制初步--让小灯闪烁起来
  3. 0.96寸OLED液晶显示器
  4. 在线教育投融数据(2015-2020年)
  5. GBase 8c发布(一)
  6. Linux CentOS 7 搭建DNS域名服务器
  7. Cheat Enginee(CE)对扫雷中部分属性的内存地址寻找以及修改~逆向分析
  8. ARM M3小计(一)1~3章。
  9. 重大调整!高速限速标准将不再是120km/h
  10. Android课程设计:基于离线地图服务器的Android地图应用