小编use*_*943的帖子

为什么ssh连接到gitlab不起作用(http推送和克隆工作正常)?

我在一台旧电脑上运行x86 raring ringtail并安装了bitnami gitlab 5.3.

尝试在SSH模式下推送第一个主分支时,这是我的错误消息:

fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Run Code Online (Sandbox Code Playgroud)

(它在http协议中使用gitlab web仪表板凭据)

  1. 我已经bitnami-installer.runroot用户一起启动,所以我认为所有文件都进入/opt而不是/home(这是一个很好的程序?)
  2. git在安装GitLab之前我没有用户,因为我听说它可能会混淆.ssh/authorized_keys文件和其他权限.
  3. 当我运行ssh -T git@my-server.com它说permission denied (public key)但我客户端计算机上的pub键也在.ssh/authorized_keys
  4. authorized_keys 对于每一行,也有适当的内容:

    command= "/opt/gitlab/apps/"
    
    Run Code Online (Sandbox Code Playgroud)
  5. 我也注意到我无法authorized_keys用a 显示文件的内容sudo -su git nano authorized_keys:

    用户不在sudoers文件中.

  6. 但每次验证的sudo /opt/gitlab/apps/gitlab/gitlab-shell/bin/check回报ok(gitlab api,acces,repo和/home/git/.ssh/authorized_keysfile(因为我已经在config.yml gitlab_url中设置为:http://myserver.com/gitlab …

ssh ubuntu gitlab

10
推荐指数
2
解决办法
1万
查看次数

标签 统计

gitlab ×1

ssh ×1

ubuntu ×1