简体   繁体   English

如何使用gitlab验证git克隆

[英]How to authenticate a git clone with gitlab

I have a question is it possible to let someone authenticate when cloning your source code. 我有一个问题是,在克隆源代码时可以让某人进行身份验证。 I know you can set your repo to private but if someone knows the https address of your repo they can still git clone it without authentication except of having a gitlab or github user account. 我知道您可以将您的仓库设置为私有,但如果有人知道您的仓库的https地址,他们仍然可以在没有身份验证的情况下克隆它,除非有gitlab或github用户帐户。 I think this is a weird approach because this is not a safe method of storing source code.you want only let people clone this code that have permission to do so, not people that saw your https address and thought it would be fun to clone your code base. 我认为这是一种奇怪的方法,因为这不是一种存储源代码的安全方法。你只想让人们克隆这个有权这样做的代码,而不是看到你的https地址的人,并认为克隆你的内容会很有趣代码库。

If the repo is indeed private, the user need to be authenticated (either via email/password login or SSH key). 如果repo确实是私有的,则需要对用户进行身份验证(通过电子邮件/密码登录或SSH密钥)。 Can you check your repo settings? 你能检查你的回购设置吗? There is no way for a private repo to get cloned without any credentials. 没有任何凭据,私有仓库无法克隆。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM