git pull本地拉取代码时,No remote repository specified报错处理

发布时间 2023-07-20 11:28:29作者: 吉祥知知

找到本地仓库文件夹,在.git 路径下,找到config文件,

进去修改

[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
ignorecase = true
[remote "origin"]
url = https://git.xxx/x'x'x/aaa.git
fetch = +refs/heads/*:refs/remotes/origin/*

pushurl= https://git.xxx/x'x'x/aaa.git
[branch "master"]
remote = origin
merge = refs/heads/master

把其中的url换成我们所使用的url就可以了

url = https://git.xxx/x'x'x/aaa.git

pushurl= https://git.xxx/x'x'x/aaa.git