Gitlab Get Started
Note
- 推荐使用 ssh 拉取 - 更快
设置中文
- 前往 https://gitlab.com/-/profile/preferences#localization
- 选择 Chinese
确认 SSH key
- 用于 git 仓库登陆
- 用于服务器登陆
- 有时用于加密解密数据
- id_rsa.pub, id_ed25519.pub
# Windows
type %HOMEDRIVE%%HOMEPATH%\.ssh\id_rsa.pub
type %USERPROFILE%\.ssh\id_rsa.pub
# macOS, Linux
cat ~/.ssh/id_rsa.pub
# 如果没有则生成
ssh-keygen -t ed25519 -C "[email protected]"
- 会输出生成到的位置
- 会要求输入密钥
- 不想要每次都输入密钥可以
ssh-add
设置共钥
- 前往 https://gitlab.com/-/profile/keys
- 获取公钥 - id_rsa.pub, id_ed25519.pub
# Windows
# 也可能在 %USERPROFILE%/.ssh/
type %HOMEDRIVE%%HOMEPATH%\.ssh\id_rsa.pub
# macOS, Linux
cat ~/.ssh/id_rsa.pub - 输入提交