gitlab帮助文档

2023-11-11

SSH keys

An SSH key allows you to establish(建立) a secure connection between your computer and GitLab.

Before generating an SSH key in your shell,

check if your system already has one by running the following command:

Windows Command Line:

type %userprofile%\.ssh\id_rsa.pub

GNU/Linux/Mac/PowerShell:

cat ~/.ssh/id_rsa.pub

If you see a long string starting with ssh-rsa, you can skip the ssh-keygen step.

To generate a new SSH key, use the following command:

This command will prompt(提示) you for a location and filename to

store the key pair and for a password.

When prompted for the location and filename,

just press enter to use the default.

If you use a different name, the key will not be used automatically.

Note: It is a best practice to use a password for an SSH key,

but it is not required and you can skip creating a password by pressing enter.

If you want to change the password of your key later,

you can use the following command:

ssh-keygen -p <keyname>

Use the command below to show your public key:

Windows Command Line:

type %userprofile%\.ssh\id_rsa.pub

GNU/Linux/Mac/PowerShell:

cat ~/.ssh/id_rsa.pub

Copy-paste the key to the ‘My SSH Keys’ section under the ‘SSH’ tab

in your user profile.

Please copy the complete key starting with ssh-rsa

and ending with your username and host.

To copy your public key to the clipboard(剪贴板),

use the code below.

Depending on your OS you’ll need to use a different command:

Windows Command Line:

type %userprofile%\.ssh\id_rsa.pub | clip

Windows PowerShell:

cat ~/.ssh/id_rsa.pub | clip

Mac:

pbcopy < ~/.ssh/id_rsa.pub

GNU/Linux (requires xclip):

xclip -sel clip < ~/.ssh/id_rsa.pub

Deploy keys

Deploy(部署) keys allow read-only access to multiple projects
with a single SSH key.
用一个公钥访问多个 项目。

This is really useful for cloning repositories to
your Continuous Integration (CI) server(连续集成服务器).

By using deploy keys, you don’t have to setup a dummy user account.

If you are a project master or owner,
you can add a deploy key in the project settings
under the section 'Deploy Keys'.
如果你是一个项目的主分支或者拥有者,
你可以添加一个部署公钥在你的项目设置当中。

Press the 'New Deploy Key' button and upload a public SSH key.
After this, the machine that uses the corresponding(相应的) private key has read-only access to the project.

You can’t add the same deploy key twice with the ‘New Deploy Key’ option.
你不能够按这个new deploy key,添加两个相同的部署公钥。

If you want to add the same key to another project, please enable it in the list that says 'Deploy keys from projects available to you'.
如果你想给另外的一个项目使用一个相同的部署公钥。
那么就需要在另外的项目当中设置公钥有效。

All the deploy keys of all the projects you have access to are available.
This project access can happen through being a direct member of the project,
or through a group.
See def accessible_deploy_keys inapp/models/user.rb for more information.

Deploy keys can be shared between projects,
you just need to add them to each project.


Applications

Eclipse

How to add your ssh key to Eclipse:
https://wiki.eclipse.org/EGit/User_Guide#Eclipse_SSH_Configuration

Tip: Non-default OpenSSH key file names or locations

If, for whatever reason, you decide to specify(指定) a non-default location and filename for your GitLab SSH key pair,

you must configure your SSH client to find your GitLab SSH private key
for connections to your GitLab server (perhaps gitlab.com).

For OpenSSH clients,
this is handled in the ~/.ssh/config file with a stanza(诗节) similar to the following:

#
# Main gitlab.com server
#
Host gitlab.com
RSAAuthentication yes
IdentityFile ~/my-ssh-key-directory/my-gitlab-private-key-filename
User mygitlabusername

Another example

#
# Our company's internal GitLab server
#
Host my-gitlab.company.com
RSAAuthentication yes
IdentityFile ~/my-ssh-key-directory/company-com-private-key-filename

Note in the gitlab.com example above a username
was specified(指定) to override the default chosen by OpenSSH (your local username).
This is only required if your local and remote(0 usernames differ.

Due to the wide variety(品种) of SSH clients and

their very large number of configuration options,

further explanation of these topics is beyond the scope of this document.
对这些主题的进一步解释超出了本文档的范围。

Public SSH keys need to be unique, as they will bind to your account.
Your SSH key is the only identifier you’ll have when pushing code via SSH.
That’s why it needs to uniquely map to a single user.

公共SSH密钥必须是唯一的,因为它们将绑定到您的帐户。
您的SSH密钥是通过SSH来推动代码时唯一的标识符。
这就是为什么它需要唯一地映射到单个用户的原因。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

gitlab帮助文档 的相关文章

随机推荐

  • Asp.Net Core&CAP实现分布式事务

    需要注意的是标题中的CAP不是指的CAP理论 而是园区大神杨晓东实现的框架 CAP框架基于本地消息表用最终一致性实现分布式事务 本地消息表 首先我们考虑一个场景 在将用户信息更改后 需要发送一条消息到消息队列 缓存或是写入到其他库中 这个过
  • STM32F103ZET6【HAL函开发】STM32CUBEMX------II2C实验

    SCL和SDA都要接上拉电阻 起始信号 SCL为高 SDA由高变为低 停止信号 SCL为高 SDA由低变为高 数据有效性 SCL为高电平时 SDA数据有效 此时SDA为高电平时 表示数据为 1 为低电平时 表示数据为 0 当SCL为低电平时
  • Linus命令大全

    Linus命令是Linux操作系统中的一些常用命令 下面是一些常用的Linus命令 ls 用于显示当前目录中的文件和目录 cd 用于切换当前目录 pwd 显示当前目录的路径 mkdir 创建新目录 rm 删除文件或目录 cp 复制文件或目录
  • MoveIt入门之——使用MoveIt配置助手生成MoveIt配置文件

    一 安装MoveIt assistant sudo apt get install ros kinetic moveit 如果报错说找不到软件包 可能是没有更新源 只要去roswiki上找安装教程 把源重新加入就可以了 二 打开配置助手 r
  • npm ERR! code EPERM npm ERR! syscall unlink npm ERR!错误解决方法

    npm ERR code EPERM npm ERR syscall unlink npm ERR 错误解决方法 1 问题描述 2 解决方法 1 问题描述 由于之前电脑系统的原因 电脑重置了一下 之前安装的环境都没了 然后在重新安装node
  • 架构之重构的 12 条军规

    注 架构之重构的 12 条军规 上 发布以后 一些读者着急要下篇 所以在这里我把上下篇合并成一篇 让大家可以阅读完整版 不用分开看了 对于开发者来说 架构设计是软件研发过程中最重要的一环 所谓没有图纸 就建不了房子 在遍地 App 的互联网
  • 自学Python能做什么副业?通过这篇文章一起来看看

    很多小伙伴想在业余的时间自学一下python语言 但是又不知道python能够给自己带来什么 那么小编就通过这篇文章来和大家一起说说python学会了能做哪些副业 一 兼职处理数据 在目前的万物互联的时代下 越来越多的人离不开电脑 手机的办
  • 爬虫中的大哥大-scrapy框架介绍

    文章适合于所有的相关人士进行学习 各位看官看完了之后不要立刻转身呀 期待三连关注小小博主加收藏 小小博主回关快 会给你意想不到的惊喜呀 文章目录 scrapy介绍及安装 创建项目 创建爬虫 注意 如何运行 scrapy爬虫实战 1 sett
  • VMWare安装Ubuntu18时卡住

    VMWare安装Ubuntu18时卡住 今天安装Ubuntu时发现一直卡在 Started Network Manager Script Dispatcher Service 或者Mounting 的地方 由于点击安装之后没看 过了2小时看
  • Spring中获取Bean对象的三种注入方式和两种注入方法

    目录 前言 获取Bean对象的三种注入方式 属性注 构造 法注 Setter 注 属性注 构造 法注 和Setter 注 有什么区别呢 两种注入方法 Autowired 和 Resource Autowired 和 Resource 有什么
  • vue3 vite sass样式大量重复

    在vite config ts中配置 css preprocessorOptions 导入scss预编译程序 scss additionalData import assets scss variables scss import asse
  • Linux下修改IP、DNS、路由命令行设置

    一 快速修改 重启后设置就没了 ifconfig eth0 192 168 1 22 netmask 255 255 255 0 up route add default gw 192 168 1 2 二 修改配置文件 重启设置还在 一 u
  • LeetCode-2373. 矩阵中的局部最大值【矩阵,数组】

    LeetCode 2373 矩阵中的局部最大值 矩阵 数组 题目描述 解题思路一 原地修改 首先将每个3 3的矩阵的最大值存放在左上角的点 然后修改给的grid矩阵的大小 解题思路二 暴力 申请一个数组 解题思路三 0 题目描述 给你一个大
  • java8中常用函数式接口Supplier<T>、Consumer<T>、Function<T,R>、Predicate<T>使用示例

    场景 函数式接口 Functional Interface 就是一个有且仅有一个抽象方法 但是可以有多个非抽象方法的接口 而java中的函数式编程体现就是Lambda 所以函数式接口就是可以适用于Lambda使用的接口 下面介绍四个常用的函
  • 热议话题

    这两天在平台上看见了一个有趣的问题 为什么医生 律师 教师等传统职业都是越老越吃香 不出意料 这个问题的浏览量非常高 下面回答众说纷纭 但让我印象深刻的还是下面这个回答 犀利而真实 作为声名远扬的高薪职业 程序员相关话题一直是焦点 如 薪资
  • Macos下重置MySQL密码

    环境信息 Macos Catalina 10 15 7 19H2 MySQL 8 0 22 问题 忽然一段时间忘记了MySQL数据库的密码 登录不上去了 该如何办呢 预想中的路径 mysqld safe skip grant tables
  • 转载:电缆种类及选型计算

    电缆种类及选型计算一 电缆的定义及分类 广义的电线电缆亦简称为电缆 狭义的电缆是指绝缘电缆 它可定义为 由下列部分组成的集合体 一根或多根绝缘线芯 以及它们各自可能具有的包覆层 总保护层及外护层 电缆亦可有附加的没有绝缘的导体 我国的电线电
  • dockerfile制作各应用镜像实例

    目标 例如 记录 dockerfile制作各应用镜像实例代码 应用实例 搭建jar应用程序docker容器 Dockerfile文件 FROM java 8 MAINTAINER 126 126 net COPY automation 1
  • NuajWeatherSystem实现昼夜更替

    实现昼夜交替以及纬度变化 还有影响灯光的变化的Unity 3d插件 链接 http pan baidu com s 1mhFZa8w 密码 y3v1
  • gitlab帮助文档

    SSH keys An SSH key allows you to establish 建立 a secure connection between your computer and GitLab Before generating an