【问题标题】:Does cloning a repo using Github CLI use HTTPS or SSH?使用 Github CLI 克隆 repo 是否使用 HTTPS 或 SSH?
【发布时间】:2020-09-30 10:30:45
【问题描述】:

我是需要通过 SSH 完成推送的 GitHub 组织的成员,所以当我克隆存储库时,我需要使用语法 git clone git@github.com:<ORG>/<REPO>.git

我现在越来越多地使用 GitHub CLI,并且刚刚注意到 GitHub 上的新(ish)选项“使用 GitHub CLI 克隆”(gh repo clone <ORG>/<REPO>)。这是否使用 SSH 或 HTTPS 进行克隆?据我所知,the official docs 没有具体说明。

【问题讨论】:

    标签: git github git-clone github-cli


    【解决方案1】:

    进一步挖掘表明the default git_protocol is HTTPS

    您可以覆盖它以默认使用gh config set git_protocol ssh 的ssh,并通过查看gh config get git_protocol 的输出来检查它是否有效。

    【讨论】:

      猜你喜欢
      • 2021-11-11
      • 2021-07-16
      • 2020-11-24
      • 2019-10-03
      • 2018-09-14
      • 1970-01-01
      • 2013-08-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多