使用GitLab 6.8.2.我可以匿名克隆公共存储库吗?
我在我的用户名称空间中有repo标记为public.如果没有保存在GitLab中的公钥,我无法克隆它.
例如:
> ssh -T git@git.site.com
Welcome to GitLab, Known Username!
Run Code Online (Sandbox Code Playgroud)
从GitLab中存储的公钥帐户执行此操作时.
但是当没有任何密钥和GitLab帐户从用户做同样的事情时,我有:
> ssh -T git@git.site.com
Permission denied (publickey).
Run Code Online (Sandbox Code Playgroud)
详细输出:
> ssh -v git@git.site.com
OpenSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to git.site.com [...] port 22.
debug1: Connection established.
debug1: identity file /home/ubuntu/.ssh/id_rsa type -1
debug1: identity file /home/ubuntu/.ssh/id_rsa-cert type -1
debug1: identity file /home/ubuntu/.ssh/id_dsa type -1
debug1: identity file /home/ubuntu/.ssh/id_dsa-cert type -1
debug1: identity file /home/ubuntu/.ssh/id_ecdsa type -1
debug1: identity file /home/ubuntu/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.5
debug1: match: OpenSSH_6.5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA ...
debug1: Host 'git.site.com' is known and matches the ECDSA host key.
debug1: Found key in /home/ubuntu/.ssh/known_hosts:1
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/ubuntu/.ssh/id_rsa
debug1: Trying private key: /home/ubuntu/.ssh/id_dsa
debug1: Trying private key: /home/ubuntu/.ssh/id_ecdsa
debug1: No more authentication methods to try.
Permission denied (publickey).
Run Code Online (Sandbox Code Playgroud)
简单来说,它是SSH,不允许使用git@git.site.com建立非授权连接.我以为我甚至可以匿名访问git@git.site.com和GitLab来手动管理访问权限.我想这是我的SSH配置错误.
如何在没有公钥的情况下将公共仓库克隆为匿名?
您可以使用HTTPS而不是SSH克隆公共存储库而无需任何身份验证.
例如:
这是一个公共存储库:https://gitlab.com/0X1A/dotfiles
该页面还包含使用HTTPS克隆存储库的链接,如下所示:
git clone https://gitlab.com/0X1A/dotfiles.git
系统不会要求您进行身份验证.
| 归档时间: |
|
| 查看次数: |
7548 次 |
| 最近记录: |