西安网站建设l西安搜推宝网络,百度小说排行榜2019,新手自学网站,h网站模版git配置SSH 密钥 1.window配置ssh1.安装ssh2.安装 Git#xff08;安装教程参见安装Git#xff09;并保证版本大于 1.93.SSH 尽量保持最新#xff0c;6.5之前的版本由于使用… git配置SSH 密钥 1.window配置ssh1.安装ssh2.安装 Git安装教程参见安装Git并保证版本大于 1.93.SSH 尽量保持最新6.5之前的版本由于使用 MD5 签名 2.查看已存在的 SSH 密钥3.怎么生成密匙4.怎么拷贝公钥5.报错Permission denied (publickey).fatal: Could not read from remote repository. 1.window配置ssh
1.安装ssh 在PowerShell中输入ssh,如果有消息弹出说明安装成功。 直接下载OpenSSH 配置环境变量
2.安装 Git安装教程参见安装Git并保证版本大于 1.9
3.SSH 尽量保持最新6.5之前的版本由于使用 MD5 签名
2.查看已存在的 SSH 密钥
ED25519 算法
cat ~/.ssh/id_ed25519.pubRSA 算法
cat ~/.ssh/id_rsa.pub3.怎么生成密匙
访问终端 Windows 请使用 WSL或 Git Bash运行ssh-keygen -t。 输入密钥算法类型和可选的注释。 注释会出现在.pub文件中一般可使用邮箱作为注释内容。 基于ED25519算法生成密钥对命令如下
ssh-keygen -t ed25519 -C 注释内容基于RSA算法生成密钥对命令如下
ssh-keygen -t rsa -C 注释内容点击回车选择 SSH 密钥生成路径。 以 ED25519 算法为例默认路径如下
Generating public/private ed25519 key pair.
Enter file in which to save the key (/home/user/.ssh/id_ed25519):密钥默认生成路径/home/user/.ssh/id_ed25519公钥与之对应为/home/user/.ssh/id_ed25519.pub。 以 RSA 算法为例默认路径如下
Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa):密钥默认生成路径/home/user/.ssh/id_rsa公钥与之对应为/home/user/.ssh/id_rsa.pub。 设置一个密钥口令。 Enter passphrase (empty for no passphrase):
Enter same passphrase again:口令默认为空你可以选择使用口令保护私钥文件。如果你不想在每次使用 SSH 协议访问仓库时都要输入用于保护私钥文件的口令可以在创建密钥时输入空口令。
4.怎么拷贝公钥
Windows在WSL或Git Bash下:
cat ~/.ssh/id_ed25519.pub | clipMac:
tr -d \n ~/.ssh/id_ed25519.pub | pbcopyGNU/Linux (requires xclip):
xclip -sel clip ~/.ssh/id_ed25519.pub5.报错Permission denied (publickey).fatal: Could not read from remote repository.
输入指令ssh-keygen -t rsa