Git

Git修改远程仓库地址

2022-04-03  本文已影响0人  老陈Android馆

问题描述:

今天push hexo 源代码到 coding 上时,报错说:

atal: unable to access 'https://git.dev.tencent.com/AlanKeene/hexo.git/': Couldn't connect to server

猜测是 Coding 的地址又改了,登上 Coding 一看,果然没错。把仓库地址修改过来就好了。

修改本地仓库关联的远程仓库地址

  1. 进入项目的 **/.git 文件夹,
    (是个隐藏文件夹)
  2. 找到 config 配置文件,修改关联的远程仓库地址,如下图:


    image.png

修改完,git push 就能成功部署了。

也可以用git命令查看本地所关联的远程仓库地址:

git remote -v

上一篇 下一篇

猜你喜欢

热点阅读