【问题标题】:Disconnected: No supported authentication methods available (server sent: publickey) when push code to gitlab from Android studio断开连接:从 Android Studio 将代码推送到 gitlab 时,没有可用的受支持的身份验证方法(服务器发送:publickey)
【发布时间】:2018-08-17 10:53:15
【问题描述】:

更新git后,我只是想出了一个问题,就是在android studio和gitlab之间push或者pull代码的时候,出现了一个问题:

FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey)
fatal: Could not read from remote repository.

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

我在网上搜了一下,发现ssh有连接问题,但是

我仍然可以将项目克隆到我的本地机器。

我已经检查了我的电脑和 gitlab 上的 ssh 公钥,它们仍然存在。

我的github工作正常,可以push或者pull代码

【问题讨论】:

    标签: android-studio ssh gitlab ssh-keys


    【解决方案1】:

    如果ssh -T git@<yourGitLabServer> 确实有效(意味着您收到“欢迎”消息),请检查您是否可以通过以下方式查询 repo:

    git ls-remote git@<yourGitLabServer>:<user>/repo
    

    如果是这种情况,那么肯定存在权限问题,导致您无法推送(例如,您不再是该项目的合作者)

    【讨论】:

      猜你喜欢
      • 2023-03-26
      • 1970-01-01
      • 2020-09-23
      • 2018-04-02
      • 2016-05-26
      • 2018-05-21
      • 2019-12-05
      • 2013-12-16
      • 2016-06-05
      相关资源
      最近更新 更多