github继续折腾

又在折腾github了,本来以前在neworiginou这个github上上传过项目的;

 

现在想在另一个github上joely上传项目,发现按以前的流程做个测试,居然没能上传成功!

 

经发现,以前的neworiginou账号设置了ssh key,而joely里没有;是不是这个原因,于是重新测下能不能再neworiginou上上传项目,卧槽,居然也不能了 这是为什么呢?

 

输入命令:$ssh -T git@github.com

提示的是:

Warning: Permanently added the RSA host key for IP address '192.30.252.129' to the list of known hosts.

Permission denied (publickey).

 

难道是我ssh key 已经不存在或者修改了,于是进入 ~/.ssh/目录下 发现存在一个known_hosts文件,打开查看,一堆信息也没看懂,先还是备份好,以备有用;然后按照网上教程重新创建ssh key

 

参考:http://www.xuanfengge.com/using-ssh-key-link-github-photo-tour.html

 

$ ssh-keygen -t rsa -C "oyq_ios@163.com"

然后一路回车;

然后到github上添加 ssh key;

将公钥的内容复制到系统粘贴板

我的办法是去到文件夹里打开文件全选复制;

步骤:

先打开隐藏文件:

  1. defaults write com.apple.finder AppleShowAllFiles -bool true  
  2.   2. killall Finder 
  3.   3.前往->个人->.ssh文件夹打开
  4.  
  5. 想将已经在github上down的项目上传到我的github上的,但是没成功
  6. 做法是在文件夹下删除.git文件
  7.  

//删除文件夹下的所有 .git 文件

find . -name ".git" | xargs rm -Rf

 

然后做上传,失败;

但是我从github上先down下我的github上的空项目,然后将已有的项目文件复制到这个空项目文件里,当然不能复制.git文件,然后上传,居然成功了!  就是现在上传的

https://github.com/neworiginou/testtutu

 

参考链接:http://blog.csdn.net/leikezhu1981/article/details/47664215

 

志彬提供的:http://www.runoob.com/w3cnote/git-guide.html

以后再折腾  

一台电脑绑定两个github帐号 

posted @ 2016-06-25 18:16  xiaoou  阅读(171)  评论(0编辑  收藏  举报