在 cpanel 中使用 HTTP 克隆私有 git 存储库

clone private git repository with HTTP in cpanel

我想将 Cpanel 与 GitLab 实例集成,它的存储库是私有的,我不能使用 SSH,因为我无权访问此实例和 Cpanel 服务器的配置(除了 ssh 密钥部分Cpanel 本身)。

在 Cpanel 中,git 部分不接受私有 git 存储库的 HTTP URLs,它建议使用 SSH URLs,但我不能.

我试图在 URL 中使用带有用户名和密码的 HTTP URL,但它阻止我这样做。像这样:
https://USER:PASS@gitlab-instance.com/username/repository.git

任何人都可以帮助我使用 SSH 访问私有 git 存储库?

你应该:

  1. 添加 ssh 密钥

https://docs.gitlab.com/ee/gitlab-basics/create-your-ssh-keys.html

  1. 通过 ssh 访问存储库

git@gitlab-instance.com:username/repository.git