mac端 githup 创建并上传项目

2017-08-04  本文已影响0人  Buddha_like

.下载安装git客户端http://code.google.com/p/git-osx-installer/downloads/list?can=3

二.进入githup上并注册就可以,记得进行邮箱验证

三.创建项目

四.创建.ssh

(1)defaults write com.apple.finderAppleShowAllFiles -bool true

(2)mkdir.ssh

如果出现File exists 说明存在 建议删除 

附加:打开隐藏文件夹的方法https://jingyan.baidu.com/article/36d6ed1f524bf21bcf488331.html

(3)如果直接创建成功 输入open .ssh 打开文件夹待命就可以

(4)cd.ssh //进入文件夹

(5)ssh-Keygen -t rsa -C "输入你自己的邮箱"

(6)pbcopy < ~/.ssh/id_rsa.pub //拷贝文件 然后打开Word或者Pages Contro+V 粘贴一下就可以 数据后面会用到

(7)终端输入:ssh -T git@github.com 检查连接 

Hi MiracleHe! You'vesuccessfully authenticated, but GitHub doesnotprovide shellaccess.

如果出现上面命令,说明成功

五.第一次上传项目

5.git push -u origin master 就可以了

上一篇 下一篇

猜你喜欢

热点阅读