Git使用——与github共舞01
来源:互联网 发布:数据防泄漏国内厂家 编辑:程序博客网 时间:2024/05/20 17:38
Git基本使用
1.$mkdir Git2.$git config --global user.name"小伙伴自己的用户名哈"
$git config --global user.email"小伙伴自己的邮箱0.0"
3.$git init
4.$ssh-keygen -t rsa -C 小伙伴自己的@自己的.com 之后不断enter
5.$xclip -sel c ~/.ssh/id_rsa.pub 复制后添加到github
6.$新建 仓库,不要点初始化,
7.$根据提示
echo "# ×××××××" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:******/******.git
git push -u origin master
8.$
The authenticity of host 'github.com (***.***.***.***)' can't be established.RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'github.com,***.***.***.***' (RSA) to the list of known hosts.sign_and_send_pubkey: signing failed: agent refused operationPermission denied (publickey).fatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.
9.接下来按照知乎大佬的方法抢救一下0.0对公钥或者秘钥进行权限降级处理:
首先,清除所有的key-pair
9.01 $ssh-add -D
9.02 $rm -r ~/.ssh
9.03 删除你在github中的public-key
重新生成ssh密钥对
9.04 $ssh-keygen -t rsa -C "xxx@xxx.com"
9.05 $chmod 0700 ~/.ssh
9.06 $chmod 0600 ~/.ssh/id_rsa*
接下来正常操作在github上添加公钥public-key:
9.07首先在你的终端运行
$xclip -sel c ~/.ssh/id_rsa.pub将公钥内容复制到剪切板
2、在github上添加公钥时,直接复制即可
3、保存
测试:在终端 ssh -T git@github.com
作者:段海宁链接:https://www.zhihu.com/question/21402411/answer/42836492来源:知乎
10.然而。。。The authenticity of host 'github.com (***.***.***.***)' can't be established.RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'github.com,***.***.***.***' (RSA) to the list of known hosts.sign_and_send_pubkey: signing failed: agent refused operationPermission denied (publickey).
11.$eval "$(ssh-agent -s)"
12.$ssh-add
13.$ssh -T git@github.com
14.重启
15.OK
阅读全文
1 0
- Git使用——与github共舞01
- Git与github使用
- Git与GitHub使用
- Git与GitHub使用
- Git 与 GitHub 使用
- Git与github的使用
- GIT与GitHub使用简介
- Github与Git安装使用
- git与github使用笔记
- Git与Github的使用
- GIT与GitHub使用简介
- GIT与GitHub使用简介
- GIT与GitHub使用简介
- git与github的使用
- GIT与GitHub使用简介
- Git & Github建立与使用
- Git与GitHub的使用
- git使用 与github搭配
- 进度条(一)
- iOS开发之基础篇(15)—— KVC、KVO
- 小白Java笔记——垃圾回收机制
- marquee功能:marquee的速度怎么设置
- HTML5的manifest缓存
- Git使用——与github共舞01
- 嵌入式Qt下UTF8转GBK
- 面试题1
- 我今天遇见的hql和纯sql的坑
- 模拟Android内存不足 activity回收 值保存 状态恢复
- ios-KVC深入
- Linux (Ubuntu/deepin等)终端命令安装Lamp
- js实现html网页直接转pdf
- Android meta-data代码中调用