gpt4 book ai didi

git - 在同一服务器上从一个用户到另一个用户的克隆问题!

转载 作者:行者123 更新时间:2023-12-02 14:26:00 26 4
gpt4 key购买 nike

我正在部署Rails应用程序。

我在服务器上设置了Gitosis。
Git用户已启动,我已经在服务器上拥有“部署”用户!我是从服务器上的部署用户“git clone”到本地计算机的。
设置Gitosis之后,我还能够从服务器(git用户)进行“git clone”。

我想要的是将服务器内部的“git clone”从“git clone”用户“git clone”变为“deploy”用户!

here图片中的问题。

我已经知道此问题在ssh权限等中,因为当我尝试在部署用户上进行“git clone”操作时,

Initialized empty Git repository in /home/deploy/some_folder/.git/
The authenticity of host '[178.xx.xx.xx]:30000 ([178.xx.xx.xx]:30000)' can't be established.
RSA key fingerprint is dc:f3:53:35:xx:xx:xx:f7:62:4c:e3:68:7e:70:46:cb.
Are you sure you want to continue connecting (yes/no)? ( MY ANSWER yes )
Failed to add the host to the list of known hosts (/home/deploy/.ssh/known_hosts).
git@178.xx.xx.xx's password:

请让我知道该怎么办才能解决此问题!

提前致谢!

最佳答案

这可能不是git问题,而是ssh问题。您应该能够尝试通过ssh到git服务器(即localhost)来复制相同的问题。文件夹〜/ .ssh(或〜/ .ssh / known_hosts)权限极有可能是不正确的(磁盘可能已满,或者文件系统也可能损坏,但可能性很小)。

如果其中没有重要数据,则可以尝试删除〜/ .ssh,并让ssh在下次尝试ssh(或git)到localhost时对其进行重建。

话虽如此,我现在记得gitosis使用证书进行用户身份验证。您的.ssh应该有一个id_rsa和id_rsa.pub。如果将它们保存在本地主机中,请确保将其保存。

还要确保已将部署用户的证书注册到gitosis,并允许访问gitosis.conf中的存储库。 ssh阶段要求输入密码意味着您的私钥由于某种原因未用于身份验证。

关于git - 在同一服务器上从一个用户到另一个用户的克隆问题!,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3320834/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com