简体   繁体   English

Gitlab - SSH 密钥怀疑

[英]Gitlab - SSH KEY doubdt

although I know that this is my first question within Stack overflow so I will try to be as consist as possible, I continue.虽然我知道这是我在堆栈溢出中的第一个问题,所以我会尽量保持一致,我继续。

Within where I work, I am in charge of implementing and training the development team to use tools related to git, within the same we use gitlab, a tool in which until now I have learned to move but as every human being I had to adapt, what that now has become a stone in the shoe has been everything related to ssh keys to be able to access the repositories of the company, my doubt is regarding that, I know that every time you create a gitlab repository you recommended create a key ssh, I already create one, so, every time I use the first repository that I create, I do not have a problem when doing commits, push, pull, or all the other related commands, but when I want to use or clone another repository for console, I miss the error "git@gitlab.com: Permission denied (publickey). fatal: Could not read from remote repository. "在我工作的地方,我负责实施和培训开发团队使用与 git 相关的工具,同时我们使用 gitlab,一个工具,到目前为止我已经学会了移动,但作为每个人,我必须适应,现在已经成为鞋子中的石头的是与能够访问公司存储库的 ssh 密钥相关的所有内容,我对此表示怀疑,我知道每次创建 gitlab 存储库时,您都建议创建一个密钥ssh,我已经创建了一个,因此,每次使用我创建的第一个存储库时,在执行提交、推送、拉取或所有其他相关命令时都没有问题,但是当我想使用或克隆另一个存储库时控制台的存储库,我错过了错误“git@gitlab.com:权限被拒绝(公钥)。致命:无法从远程存储库读取。”

So my question is, every time I create a new repository, clone, or any other referral, I will have to be creating a new ssh key ??所以我的问题是,每次我创建一个新的存储库、克隆或任何其他引用时,我都必须创建一个新的 ssh 密钥? .. can not create one for everything? .. 不能为所有东西创建一个吗? ... These have expiration date ?? ...这些有保质期?? ... or that .... I ask for help from the most experienced to see if you can clarify this doubt .. thank you very much in advance I read them !! ......或者......我向最有经验的人寻求帮助,看看你是否能澄清这个疑问......非常感谢你,我已经阅读了它们! Thank you !!谢谢 !!

First of all, welcome on SO.首先,欢迎来到 SO。

No , you don't need to create an SSH key for each project / repository.您不需要为每个项目/存储库创建 SSH 密钥

Once you've created an SSH key and added it to your Gitlab account, you'll just have to add user permission to manage new repositories.创建 SSH 密钥并将其添加到 Gitlab 帐户后,您只需添加用户权限即可管理新存储库。

项目中的 Gitlab 用户

Here is something that can be useful to you : Gitlab permissions这里有一些对你有用的东西: Gitlab 权限

These have expiration date ??这些有保质期??

Actually, with GitLab 12.10 (April 2020), the SSH keys can have an expiration date:实际上,在 GitLab 12.10(2020 年 4 月)中,SSH 密钥可以有一个过期日期:

Optional SSH key expiration date 可选的 SSH 密钥到期日期

Compliance-minded organizations need a way to control SSH credential access to their GitLab environment.具有合规意识的组织需要一种方法来控制对其 GitLab 环境的 SSH 凭据访问。

SSH keys are normally configured without expiration dates. SSH 密钥通常配置为没有到期日期。
This is problematic for organizations with access management and/or credential management policies, which require an expiration date on all access credentials.这对于具有访问管理和/或凭据管理策略的组织来说是有问题的,这些策略要求所有访问凭据的到期日期。

With this release, GitLab supports expiration dates for SSH keys that users can set within the GitLab UI.在此版本中,GitLab 支持用户可以在 GitLab UI 中设置的 SSH 密钥的到期日期。

https://about.gitlab.com/images/12_10/optional-ssh-key-expiration.png

See Documentation and Issue .请参阅文档问题

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

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