标签:记事本 port pre 没有 inline min 代码 air code
git 客户端无法拉取gitlab仓库代码,登陆网页端,查看仓库主页有下面的提示
因此需要添加ssh公钥,才能上传下拉代码
windows平台:
首先需要安装git了。
"email@email.com" 是你的gitlab账户邮箱
$ ssh-keygen -t rsa -C "email@email.com" Generating public/private rsa key pair. Enter file in which to save the key (/c/Users/xxx/.ssh/id_rsa):
/c/Users/xxx/.ssh/id_rsa但是如果该文件已存在,最好输入自定义名称,如 id_demo
Enter passphrase (empty for no passphrase): Enter same passphrase again:
最终的输出信息,
Your identification has been saved in /c/Users/xxx/.ssh/id_rsa. Your public key has been saved in /c/Users/xxx/.ssh/id_rsa.pub. The key fingerprint is: SHA256:kWcSTzwyl8wMfEvwxxiUBO3o9mpIFH+RRdApHO/CVeo email@email.com The key‘s randomart image is: +---[RSA 2048]----+ | .=&BXo.. | | . +*^=oo | | o+O*=* | | . o*+= | | . .S.o E | | . o . | | . o . | | . . . | | ... | +----[SHA256]-----+
生成的两个文件路径在
/c/Users/xxx/.ssh/id_rsa
/c/Users/xxx/.ssh/id_rsa.pub
如果没有 .ssh 目录,需要使用命令行创建
mkdir .ssh
标签:记事本 port pre 没有 inline min 代码 air code
原文地址:https://www.cnblogs.com/duoxuan/p/10215987.html