【问题标题】:How to solve fatal: Could not read from remote repository in GIT?如何解决致命问题:无法从 GIT 中的远程存储库中读取?
【发布时间】:2020-10-30 06:56:21
【问题描述】:

当我执行 make init-dev 时,我在 git clone ssh 中遇到问题

if [ ! -d "goodcommerce-hydra" ] ; then git clone "git@gitlab.com:/goodcommerce/goodcommerce-hydra.git" "goodcommerce-hydra"; cd goodcommerce-hydra && git checkout "master"; fi
Cloning into 'goodcommerce-hydra'...
ssh: Could not resolve hostname gitlab.com;c: Name or service not known
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

但是当我执行时

git clone "git@gitlab.com:/goodcommerce/goodcommerce-hydra.git" "goodcommerce-hydra"

效果很好。

也许是 de ;c in ssh: 无法解析主机名 gitlab.com;c: ?

我使用的是 WINDOWS 10 专业版

【问题讨论】:

    标签: git gitlab repository ssh-keys


    【解决方案1】:

    我认为“;”这里错了

    应该这样做;虽然“git check”似乎不是一个正确的命令。

    if [ ! -d "goodcommerce-hydra"" ]; then 
    git clone "git@gitlab.com:/goodcommerce/goodcommerce-hydra.git" "goodcommerce-hydra"" && cd goodcommerce-hydra && git check 
    fi
    

    【讨论】:

    • 对不起,复制错误,我已经编辑了问题。
    猜你喜欢
    • 2015-01-19
    • 2012-11-10
    • 1970-01-01
    • 2015-10-31
    • 1970-01-01
    • 2015-11-21
    • 2018-12-10
    • 2014-09-28
    • 2020-01-20
    相关资源
    最近更新 更多