赞
踩
Windows 用户建议使用 Windows PowerShell 或者 Git Bash。
win + R 会提示没有
‘ssh-keygen’ 不是内部或外部命令,也不是可运行的程序
或批处理文件。
ssh-keygen -t ed25519 -C "Gitee SSH Key"
Generating public/private ed25519 key pair. Enter file in which to save the key (/home/git/.ssh/id_ed25519): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/git/.ssh/id_ed25519 Your public key has been saved in /home/git/.ssh/id_ed25519.pub The key fingerprint is: SHA256:ohDd0OK5WG2dx4gST/j35HjvlJlGHvihyY+Msl6IC8I Gitee SSH Key The key's randomart image is: +--[ED25519 256]--+ | .o | | .+oo | | ...O.o + | | .= * = +. | | .o +..S*. + | |. ...o o..+* * | |.E. o . ..+.O | | . . ... o =. | | ..oo. o.o | +----[SHA256]-----+
ls ~/.ssh/
id_ed25519 id_ed25519.pub
cat ~/.ssh/id_ed25519.pub
ssh-ed25519 AAAA***5B Gitee SSH Key
复制终端输出的公钥。
ssh -T git@gitee.com
git clone git@gitee.com:xx/xxx.git
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。