git clone gitosis @ host的密码问题:gitosis-admin.git [英] password problem with git clone gitosis@host:gitosis-admin.git

查看:190
本文介绍了git clone gitosis @ host的密码问题:gitosis-admin.git的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试配置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密钥。在运行gitosis-init时,您需要配置任何公钥与您提供的私钥配合使用。你可以通过编辑〜/ .ssh / config 来包含一个节,例如

 您在命令行中使用的主机githost#主机名,在git远程等中。
HostName 12.34.56.78#实际IP地址或DNS名称连接到
用户gitosis
IdentityFile〜 /.ssh/id_rsa#无论文件存储的私钥与您提供的公钥gitosis相匹配的私钥。


I'm confronted with some problems when trying to configure gitosis on Ubuntu. When i run this command

git clone gitosis@host:gitosis-admin.git

For my local machine i used git clone git@59.80.70.68:gitosis-admin.git where 59.80.70.68 is the ip of the server. But I get a password problem. I tried entering password of the server machine, but it fails

Kindly help me.

解决方案

Gitosis never works with passwords. It always uses SSH keys. You need to configure the use of whatever public key goes with the private key you gave it when you ran gitosis-init. You would do this by editing ~/.ssh/config to include a stanza like

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 clone gitosis @ host的密码问题:gitosis-admin.git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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