多个bitbucket帐户 [英] Multiple bitbucket accounts

查看:93
本文介绍了多个bitbucket帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用于9-5工作的Bitbucket帐户,我也有个人Bitbucket帐户。我的目标是能够在同一台计算机上使用两者。我已经在Windows 7 PC上安装了最新的git。

因此,目前与我公司的Bitbucket帐户一切正常,我可以在没有问题的情况下进行推/推。我使用ssh-keygen创建了一个新的ssh密钥,并在我的例子tech中分配了一个新名称。但我在如何告诉本地repo使用我创建的新ssh密钥时遇到问题。我假设每次尝试连接时都使用第一个ssh密钥。



我得到这个错误:

$ git push
conq:存取库访问被拒绝。
致命:远程终端意外挂断



我在网上找到了一些建议,但它似乎与linux / git设置有关,例如我可以在Windows上找不到config文件。

解决方案

如果您没有将密钥添加到密钥管理器(ssh-agent)中,您可能会得到此错误。要做到这一点:

  ssh-add〜/ .ssh / tech 

顺便说一句,如果您有多个Bitbucket帐户,则每个帐户都需要一个唯一的密钥。 IOW,您无法重复使用密钥。


I have a Bitbucket account for my 9-5 job and I also have a personal Bitbucket account. My goal is to be able to use both on the same computer. I have installed the latest git on a Windows 7 pc.

So currently everything with my companies Bitbucket account works fine, I can pull/push with no problems. I created a new ssh key using ssh-keygen and assigned a new name in my case "tech". But I am having issues on how to tell a local repo to use the new ssh key I created. I am assuming everytime I try to connect it uses the first ssh key.

I get the error:

$ git push conq: repository access denied. fatal: The remote end hung up unexpectedly

I found some advice on the internet but it seems to relate to a linux/git setup, for example I can't find the "config" file on windows.

解决方案

You may get this error if you haven't added the key to the key manager (ssh-agent). To do this:

ssh-add ~/.ssh/tech

BTW, if you have multiple Bitbucket accounts, you'll need a unique key for each account. IOW, you can't reuse keys.

这篇关于多个bitbucket帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆