我已经在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.
我的 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
如果我执行:
git remote -v
打印输出:
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)
git remote -v
命令的结果进行编辑。 - tvieira