Git之创建GitHub-SSH用户凭证


1.设置Git的user.name和user.email:

git config --global user.name "yourname"
git config --global user.email "youremail@email.com"

2. 生成SSH密钥:

ssh-keygen -t rsa -C "youremail@email.com"

3. 将公钥C:\Users\Administrator\.ssh\id_rsa.pub保存到Git中:

  • GitHub为例: User -> Settings -> SSH and GPG keys -> New SSH key