使用多个身份推送到bitbucket

时间:2016-03-17 11:17:41

标签: git ssh bitbucket

我在vinay-joseph的bitbucket上有一个回购。我也在vinayjoseph的bitbucket上有回购。

以下是〜/ .ssh / config文件的内容

Host workid
 HostName bitbucket.org
 User vinay-joseph
 IdentityFile ~/.ssh/xxxx
Host personalid
 HostName bitbucket.org
 PreferredAuthentications publickey
 User vinayjoseph
 IdentityFile ~/.ssh/yyyy
当我运行ssh -T hg@bitbucket.org时,从我的回购中获取以下内容

logged in as vinay-joseph.

You can use git or hg to connect to Bitbucket. Shell access is disabled.

SSH密钥已存储在bitbucket中,用于相关的存储库。

然而,当我尝试推动时,我得到以下错误。

 git push origin master

    conq: repository access denied.
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.

ssh-add -l给出

ssh-add -l
2048 cc:15:1d:e4:ac:c6:28:eb:2a:6f:41:0e:53:62:53:c7 /Users/rr/.ssh/xxxx (RSA)
2048 4f:51:5a:49:cb:da:41:2f:08:a2:2f:05:dc:2a:63:dc /Users/rr/.ssh/yyyy (RSA)

我想使用我的personalid检查代码。请帮忙。

0 个答案:

没有答案