【问题标题】:How to set config for gitlab?如何为 gitlab 设置配置?
【发布时间】:2016-04-27 21:20:01
【问题描述】:

我使用official guide 进行配置。生成密钥。不明白如何设置配置。 这是我的文件:

[core]
  repositoryformatversion = 0
  filemode = true
  bare = false
  logallrefupdates = true
[remote "origin"]
  url = https://gitlab.com/artem-solovev-lse/notepad.git
  fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
  remote = origin
  merge = refs/heads/master

【问题讨论】:

    标签: git version-control config gitlab


    【解决方案1】:

    ssh key 与 https 网址无关。

    • https 将使用您的 GitLab 帐户凭据。
    • ssh 将使用$HOME/.ssh/id_rsa(.pub)

    如果你想使用 ssh url,你至少应该切换到 ssh:

    cd /path/to/my/repo
    git remote set-url origin git@gitlab.com:artem-solovev-lse/notepad.git
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-08-20
      • 2021-12-05
      • 2014-04-05
      • 2022-07-15
      • 1970-01-01
      • 2021-05-24
      相关资源
      最近更新 更多