我有一个beaglebone,我建立了一段时间(当我第一次学习git)与ssh密钥为特定的github帐户。该帐户是我们公司的主要帐户。许多人直接工作,并直接从beaglebone推到github上。我想更改设置,以便每当有人想要提交或推送到github时,都会查询他们的用户名。更改git设置以允许多个用户推送/提交文件
我最近的提交和推送看起来像这样...您会看到我无法输入用户名,只是公司主帐户的密码。
[email protected]:/var/lib/cloud9/pypos# git commit -a -m "class restructured and passing the new updated test script"
[class_restructure 1db2e33] class restructured and passing the new updated test script
2 files changed, 14 insertions(+), 10 deletions(-)
[email protected]:/var/lib/cloud9/pypos# git push origin class_restructure
Enter passphrase for key '/home/root/.ssh/id_rsa':
Counting objects: 7, done.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 531 bytes, done.
Total 4 (delta 3), reused 0 (delta 0)
To [email protected]:FarmDesign/pypos.git
83831a8..1db2e33 class_restructure -> class_restructure
[email protected]:/var/lib/cloud9/pypos#
不幸的是我很难设置一个https(这是一个私有存储库),这就是为什么我使用SSH密钥...我明白,通过SSH在同一台机器上使用多个用户是不可能的? – Chris 2013-04-15 15:55:53
您应该可以为私有存储库设置HTTPS。我有私人回购协议,并没有使用HTTPS的麻烦。但是,您必须将其他GitHub用户作为协作者添加到回购站,以便他们能够通过HTTPS访问回购站。 至于使用SSH密钥和多个用户 - 是的,可能有多个用户在同一台计算机上并使用SSH。如果每个用户的ssh密钥都存储在一个单独的用户帐户中,那么这是可能的。但是,我注意到您使用的是根帐户中的ssh密钥(请参阅您的问题,输入密钥“/home/root/.ssh/id_rsa':')的密码。 – 2013-04-15 17:03:07