【问题标题】:Git can't connect to Gitlab, SSH verification errorGit无法连接Gitlab,SSH验证错误
【发布时间】:2015-05-01 05:27:55
【问题描述】:

我一直在尝试使用 SSH 密钥从 Gitlab 中提取存储库。所有这些都通过 Ubuntu VM 在 Windows 8 上的命令行中完成。我已将我的公钥添加到我的 Gitlab 帐户,然后将我的私钥添加到 ssh-agent,这样做似乎没有任何错误,但是当我尝试执行 git pull 或 push 时,我遇到了这个问题错误;

fatal: unable to access 'https://git.mgmt.local/XXX/project-name.git/': 
server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

这让我直接撞到了墙上......不知道出了什么问题,谁能指出我正确的方向?

【问题讨论】:

    标签: git ssh gitlab ssh-keys


    【解决方案1】:

    那是因为您使用的是 https 网址。

    Https 表示存储在 %HOME%.ssh 中的公共和私人 ssh 密钥使用。完全没有。

    尝试切换到 ssh url:

    git remote set-url origin (user)@(ip address):(group)/(project).git
    

    对于标准 GitLab 安装,(user) 应该是 git

    您可以先检查 ssh 是否正在使用:

    ssh -Tvvv git@your_server.com
    

    【讨论】:

    • ssh -Tvvv git@your_server.com 如果您想测试 ssh 是否有效,将非常有帮助。谢谢。
    猜你喜欢
    • 2021-04-13
    • 2020-05-12
    • 2021-08-28
    • 1970-01-01
    • 2014-01-27
    • 1970-01-01
    • 1970-01-01
    • 2013-04-08
    • 1970-01-01
    相关资源
    最近更新 更多