conq:存储库不存在.致命:无法从远程存储库读取

tvi*_*ira 11 git bitbucket

我在Bitbucket中添加了ssh密钥.如果我这样做,ssh -T git@bitbucket.org他说我已经登录了.但是当我做一个git push/pull时,我收到以下消息

conq: repository does not exist.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)

我的cat .git/config产出:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
    ignorecase = true
    precomposeunicode = true
[remote "origin"]
    url = git@bitbucket.org:myUserName/myGitRepo.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
[remote "heroku"]
    url = git@heroku.com:herokuUrl.git
    fetch = +refs/heads/*:refs/remotes/heroku/*
[branch "somebranch"]
    remote = origin
    merge = refs/heads/somebranch
Run Code Online (Sandbox Code Playgroud)

如果我做:

git remote -v  
Run Code Online (Sandbox Code Playgroud)

打印出来:

heroku  git@heroku.com:herokuUrl.git (fetch)
heroku  git@heroku.com:herokuUrl.git (push)
origin  git@bitbucket.org:myUserName/myRepo.git (fetch)
origin  git@bitbucket.org:myUserName/myRepo.git (push)
Run Code Online (Sandbox Code Playgroud)

小智 11

我得到了相同的消息,我不得不从路径中删除我的用户ID ....所以而不是:

url = git@bitbucket.org:myUserName/myGitRepo.git
Run Code Online (Sandbox Code Playgroud)

有用的是:

url = git@bitbucket.org:myGitRepo.git
Run Code Online (Sandbox Code Playgroud)


San*_*nji 5

此错误是因为您在bitbucket上重命名了。首先您检查:

git remote -v origin git@bitbucket.org:OldName/wp_tanhoangminhgroup.com.vn.git
Run Code Online (Sandbox Code Playgroud)

那么您必须使用新名称更改路径

git remote set-url git@bitbucket.org:NewName/wp_tanhoangminhgroup.com.vn.git
Run Code Online (Sandbox Code Playgroud)

  • 路径更改命令为:`g​​it remote set-url origin git@bitbucket.org:NewName / wp_tanhoangminhgroup.com.vn.git`。您错过了“起源” (3认同)