我有一个私有 gitlab 实例,在尝试通过 https 访问它时需要客户端身份验证。因此,myserver.com
只有在 Web 浏览器中安装客户端证书时才会起作用。这对于常规使用来说不是问题,因为我只通过 SSH 使用 git。
但是,git LFS 似乎只支持 HTTPS。因此,当我尝试git push
在使用 LFS 的项目中向服务器上传时,它只会尝试使用 HTTPS 上传,而且显然会失败。
git push gitlab mybranch
fatal: unable to access 'https://git.myserver.com/coolguy/my-software.git/': gnutls_handshake() failed: Handshake failed
这是我的遥控器的样子:
git remote -v
gitlab git@git.myserver.com:coolguy/my-software (fetch)
gitlab git@git.myserver.com:coolguy/my-software (push)
除了在没有 LFS 的情况下删除 git 历史记录和创建新的仓库(或重新配置我的服务器、使用 VPN 等)之外,在这种情况下我还能做些什么吗?git/lfs 是否支持 HTTPS 身份验证的客户端证书?我目前在本地机器上遇到了一个我无法git push
在任何地方使用的私人分叉!
编辑:忽略以下内容,结果是一个错误的 apache 配置文件,与 git 和 gitlab 无关
git push gitlab mybranch
Remote "gitlab" does not support the LFS locking API. Consider disabling it with:
$ git config lfs.https://git.myserver.com/coolguy/my-software.git/info/lfs.locksverify false
batch response: Post https://git.myserver.comcoolguy/my-software.git/info/lfs/objects/batch: dial tcp: lookup git.myserver.comcoolguy: no such host
batch response: Post https://git.myserver.comcoolguy/my-software.git/info/lfs/objects/batch: dial tcp: lookup git.myserver.comcoolguy: no such host
batch response: Post https://git.myserver.comcoolguy/my-software.git/info/lfs/objects/batch: dial tcp: lookup git.myserver.comcoolguy: no such host
batch response: Post https://git.myserver.comcoolguy/my-software.git/info/lfs/objects/batch: dial tcp: lookup git.myserver.comcoolguy: no such host
batch response: Post https://git.myserver.comcoolguy/my-software.git/info/lfs/objects/batch: dial tcp: lookup git.myserver.comcoolguy: no such host
batch response: Post https://git.myserver.comcoolguy/my-software.git/info/lfs/objects/batch: dial tcp: lookup git.myserver.comcoolguy: no such host
请注意它是如何将 URL 用作git.myserver.comcoolguy
而不是git.myserver.com/coolguy
或git.myserver.com:coolguy
谢谢