我在尝试在 Ubuntu 上配置 gitosis 时遇到了一些问题。当我运行这个命令时
git clone gitosis@host:gitosis-admin.git
对于我的本地机器,我使用了 git clone git@59.80.70.68:gitosis-admin.git
,其中 59.80.70.68 是服务器的 ip。但是我遇到密码问题。我尝试输入服务器机器的密码,但失败了
请帮助我。
最佳答案
Gitosis 从不使用密码。它始终使用 SSH key 。您需要配置使用任何公钥以及您在运行 gitosis-init 时提供的私钥。您可以通过编辑 ~/.ssh/config
来包含像这样的节来做到这一点
Host githost # hostname you use on the commandline, in git remotes, etc.
HostName 12.34.56.78 # actually IP address or DNS name to connect to
User gitosis
IdentityFile ~/.ssh/id_rsa # whatever file stores the private key matching the public key you gave gitosis
关于git - git clone gitosis@host :gitosis-admin. git 的密码问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1005947/