【问题标题】:Can't git clone openshift repository on Ubuntu machine无法在 Ubuntu 机器上 git clone openshift 存储库
【发布时间】:2016-07-03 04:18:44
【问题描述】:

我无法 git clone 我在本地机器上的 openshift 免费托管设备上创建的应用程序。我已经使用以下链接在我的机器上设置了“rhc”工具

https://developers.openshift.com/managing-your-applications/client-tools.html

奇怪的是,公钥在服务器上更新了,我可以在我的机器上看到一个私钥。但是,当我尝试执行 git clone 时,它​​会给出下面提到的错误。

Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights

【问题讨论】:

    标签: git openshift


    【解决方案1】:

    根据您的操作系统,确保正确定义 HOME(在 Windows 上不是默认设置)

    rhcgit 管理 %HOME%\.ssh 中的公共/私有 id_rsa(.pub) 密钥

    OP sanketr 确认这是一个 ssh 密钥问题,在 Ubuntu 上使用 sudo(我评论将 $HOME 更改为 /root):

    之前它对我不起作用,因为密钥没有正确复制到 root/.ssh 文件夹中。

    【讨论】:

    • 如何在 Ubuntu 中查看?
    • @SanketR 检查 $HOME/.ssh 的内容及其 chmod(文件为 600,文件夹不可写)
    • 我检查了一下,里面有 id_rsa 和 id_rsa.pub 文件。我还将.ssh文件夹的权限设置为600,但错误仍然存​​在
    • @SanketR 600 用于文件:请参阅 stackoverflow.com/a/13428529/6309
    • 它仍然存在。我不确定问题是否是因为我使用 sudo 安装了 rhc 工具。是否会导致权限问题?
    猜你喜欢
    • 2021-09-01
    • 2019-09-16
    • 1970-01-01
    • 2017-01-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-06-01
    相关资源
    最近更新 更多