github 操作

windows平台上

gitforwindows https://gitforwindows.org/ 下载安装

1.创建秘钥

$ ssh-keygen -t rsa -C "xxx@xx.com"

提示输入密码两次 passphrase

2.测试链接github

ssh -T -v git@github.com

debug1: Offering RSA public key: /c/Users/cc/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Trying private key: /c/Users/cc/.ssh/id_dsa
debug1: Trying private key: /c/Users/cc/.ssh/id_ecdsa
debug1: Trying private key: /c/Users/cc/.ssh/id_ed25519
debug1: No more authentication methods to try.
Permission denied (publickey).

可能出现上面的错误,导致无发链接github

问题在于前面步骤中生成的 公钥的名称需要和上面这几个都匹配的上

3.初始化

 

git config --global user.name"xxx"

git config --global user.email "xx@xx.com"

git remote add origin https://github.com/billtsu/spider.git

git init

处理文件

git add .

git commit 注意这里光标 esc键 配合使用

git push origin master

 

posted @ 2018-03-20 23:25  billhsu  阅读(71)  评论(1编辑  收藏  举报