【问题标题】:Where to store the ssh public key for connecting GitLab to Bitbucket?将 GitLab 连接到 Bitbucket 的 ssh 公钥存储在哪里?
【发布时间】:2016-02-05 22:13:24
【问题描述】:

我想将 GitLab 连接(综合安装)到 Bitbucket。根据the documentation,我需要为其创建并存储一个公钥:

GitLab 会自动将您的公钥注册到 Bitbucket 作为 部署要导入的存储库的密钥。您的公钥需求 位于 ~/.ssh/bitbucket_rsa.pub,它将扩展到 /home/git/.ssh/bitbucket_rsa.pub 在大多数配置中。

事实上我没有/home/git。那么,我怎么知道我必须在哪里创建公钥,以便 GitLab 注意到它并自动注册它?

【问题讨论】:

    标签: ssh bitbucket gitlab public-key gitlab-omnibus


    【解决方案1】:

    Omnibus 安装中 git 用户的主目录默认为 /var/opt/gitlab。您可以检查您的 gitlab.rb 配置文件中的密钥 user['home'] 并查看您是否已修改它或执行 cat /etc/passwd 并在那里找到用户 git 的主目录。

    默认值user['home'](记住#表示已注释掉):

    # user['home'] = "/var/opt/gitlab"

    cat /etc/passwd | grep git的输出:

    git:x:1000:1000:git,,,:/var/opt/gitlab:/bin/sh

    找到用户 git 的主目录后,您可以将 bitbucket_rsa.pub 放入文件夹 .ssh。如果它不存在,您可以创建该文件夹。

    【讨论】:

      猜你喜欢
      • 2016-06-10
      • 2012-11-13
      • 1970-01-01
      • 2019-07-08
      • 2023-04-07
      • 1970-01-01
      • 2021-01-15
      • 1970-01-01
      • 2016-11-10
      相关资源
      最近更新 更多