打开终端输入命令ssh-keygen创建key ssh-keygen -t ed25519 -C"ichochy@outlook.com" 注意:将ichochy@outlook.com换成自己的邮箱。 命令构建ed25519 key,并自动保存到.ssh目录 Generatingpublic/privateed25519keypair. Enter fileinwhichtosave thekey(/Users/mleo/.ssh/id_ed25519): Created directory'/Users/...
点击Add SSH key ; 确认通过输入操作GitHub的密码。 Step 4、测试SSH key是否成功的添加到GitHub $ ssh-Tgit@github.com# 用 ssh 连接 github 中途会有如下提示,选择yes即可: Are you sure you want to continue connecting (yes/no)?yes
git remoteset-url origin git@github.com:reuixiy/hugo-theme-meme.git 此外,当你本地第一次连接 GitHub 的服务器时,可能会有警告信息,输入yes回车即可。 多帐号 # 帐号一 $ssh-keygen-t rsa -b4096-C"reuixiy@gmail.com"Generating public/private rsa key pair.Enterfileinwhichto save the key (/ho...
1. 到桌面(位置随意)创建本地文件夹 (假设文件名为to_do_list ) cd ~/Desktop mkdir to_do_list cd to_do_list 2. 添加readme.md (i 切换可编辑模式,esc :wq 保存并退出) vim Readme.md 3.在GitHub上创建一个新仓库(To_Do_List),生成好后,跳转到新界面,然后按照该界面的提示在终端操作。 git ...
当前,通过Git在本地仓库和远程仓库(如Github)之间进行操作,已不再支持密码验证,而是转为通过更安全的SSH密钥验证方式。 因此,本文将介绍如何生成SSH密钥以及将其添加到Github中,此外也会介绍配置过程中常见问题的解决方法。 1. 生成SSH密钥 首先在本地机器上打开终端,输入以下命令生成SSH密钥: ssh-keygen -t ed2551...
你可以连接到GitHub使用SSH ssh-keygen -t rsa -b 4096 -C "your_email@example.com" Enter passphrase (empty for no passphrase):[Type a passphrase] Enter same passphrase again:[Type passphrase again] Adding your SSH key to the ssh-agent ...
ssh-keygen -t rsa -C "your_email@example.com"# Creates a new ssh key, using the provided email as a label# Generating public/private rsa key pair.# Enter file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]ssh-add id_rsa ...
如果ssh-keygen默认的rsa算法生成的钥匙不能满足你对安全性的要求,你可以使用-b 4096参数(github推荐)提高钥匙位数,增加复杂度,也可以使用更高级别的算法,例如ecdsa、ed25519,前提是git服务器也同时支持这些算法,否则会连接失败。 使用rsa算法,4096位: ssh-keygen -...
Paste the text below, substituting in your GitHub email address. ssh-keygen -t rsa -b 4096 -C "your_email@example.com" # Creates a new ssh key, using the provided email as a label Generating public/private rsa key pair. When you're prompted to "Enter a file in which to save the ...
2.3.生成(或删除)秘钥 ssh-keygen -t rsa -C "xxx@xx.com"//这里的邮箱要换成自己注册时的邮箱 接着按3个回车即可。 注1:如果本地有ssh,执行以上命令会出现正面的提示,这里选择y,表示覆盖本地的ssh key,其实也就是ssh秘钥删除的意思 注2:为什么要删除秘钥,创建SSH的时候设置过密码,那就很有可能git操作...