个人笔记 github

来源:互联网 发布:java工厂设计模式原理 编辑:程序博客网 时间:2024/05/16 09:18
个人笔记,github入门,添加ssh-key,常用命令

cd wd
git clone git@github.com:kailiuliuliu/kai.git
cd kai

git pull

git status

git add *.*

git commit

git push

添加ssh-key步骤,首先安装git
1. 进入git bash
git config --global user.name "kai"
git config --global user.email "fengk1992@126.com"

ssh-keygen -t rsa -C "fengk1992@126.com"
按3个回车,则密码为空。默认地址C:\Users\user\.ssh

2. 在github网站上添加id_rsa.pub里的内容
3. 测试之
ssh git@github.com
显示结果###############
$ ssh git@github.com
The authenticity of host 'github.com (198.19.0.112)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,198.19.0.112' (RSA) to the list of known hosts.
PTY allocation request failed on channel 0
Hi kailiuliuliu! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
显示结果###############
原创粉丝点击