github for linux
2015-03-30 14:54
113 查看
github for linux (centos)
1,登陆https://github.com/注册账号
2,安装
# su root
#yum insatll git git-ui
把本地仓库传到github,需要配置ssh key
3,配置github
创建本地ssh key
#ssh-keygen -t rsa -C "你的邮箱"
#ls -a 列出隐藏文件
这时候会创建id_rsa id_rsa.pub两个文件
回到https://github.com/进入Accout Settings, 左边的列表中 选择ssh keys, add ssk key ,
然后 任意输入title, 将id_rsa.pub文件中的key ,粘贴到编辑框中。
4,测试能否连接
进入linux ,
#ssh -T git@github.com
You've successfully ,呵呵,就成功了。
遇到的问题,重新安装git git-ui
#yum reinstall git git-ui 重复上述过程问题解决了 .........
5,将本地仓库上传到github,要先设置username ,email(github将记录所有的commit)
6,设置git信息
# git config --global user.name "your name"
# git config --global user.email "your_email@youremail.com"
7,创建一个新的项目
#mkdir projectName 创建文件夹
#cd projectName 进入文件夹
#git init git初始化
#touch README 创建README文件
#git add README add README文
#git commit -m "commit file README" 提交
8, github端设置
在 github首页 Your Repositories处 点击“new repository” 输入名称和描述信息,选择private还是public 确定,新建一个repository(仓库)
复制ssh地址,
#git remote add origin 复制的地址 (https://github.com/xxxxx/xxxxx.git)
#git push -u origin master
error: The requested URL returned error: 403 Forbidden while accessinghttps://github.com/xxxxx/xxxxx.git/info/refs
fatal: HTTP request failed
解决办法:
#vim .git/config
url = https://github.com/yourname/example.git 修改成 url = https://yourname@github.com/yourname/example.git
就OK了
不错的博客:
http://www.cnblogs.com/purediy/archive/2013/03/07/2948892.html http://blog.csdn.net/showhilllee/article/details/27706679 http://blog.itpub.net/25851087/viewspace-1262468/
转自:http://blog.csdn.net/meiyoudao_jiushidao/article/details/44134819
不错的博客:
http://www.cnblogs.com/purediy/archive/2013/03/07/2948892.html http://blog.csdn.net/showhilllee/article/details/27706679 http://blog.itpub.net/25851087/viewspace-1262468/
1,登陆https://github.com/注册账号
2,安装
# su root
#yum insatll git git-ui
把本地仓库传到github,需要配置ssh key
3,配置github
创建本地ssh key
#ssh-keygen -t rsa -C "你的邮箱"
#ls -a 列出隐藏文件
这时候会创建id_rsa id_rsa.pub两个文件
回到https://github.com/进入Accout Settings, 左边的列表中 选择ssh keys, add ssk key ,
然后 任意输入title, 将id_rsa.pub文件中的key ,粘贴到编辑框中。
4,测试能否连接
进入linux ,
#ssh -T git@github.com
You've successfully ,呵呵,就成功了。
遇到的问题,重新安装git git-ui
#yum reinstall git git-ui 重复上述过程问题解决了 .........
5,将本地仓库上传到github,要先设置username ,email(github将记录所有的commit)
6,设置git信息
# git config --global user.name "your name"
# git config --global user.email "your_email@youremail.com"
7,创建一个新的项目
#mkdir projectName 创建文件夹
#cd projectName 进入文件夹
#git init git初始化
#touch README 创建README文件
#git add README add README文
#git commit -m "commit file README" 提交
8, github端设置
在 github首页 Your Repositories处 点击“new repository” 输入名称和描述信息,选择private还是public 确定,新建一个repository(仓库)
复制ssh地址,
#git remote add origin 复制的地址 (https://github.com/xxxxx/xxxxx.git)
#git push -u origin master
error: The requested URL returned error: 403 Forbidden while accessinghttps://github.com/xxxxx/xxxxx.git/info/refs
fatal: HTTP request failed
解决办法:
#vim .git/config
url = https://github.com/yourname/example.git 修改成 url = https://yourname@github.com/yourname/example.git
就OK了
不错的博客:
http://www.cnblogs.com/purediy/archive/2013/03/07/2948892.html http://blog.csdn.net/showhilllee/article/details/27706679 http://blog.itpub.net/25851087/viewspace-1262468/
转自:http://blog.csdn.net/meiyoudao_jiushidao/article/details/44134819
不错的博客:
http://www.cnblogs.com/purediy/archive/2013/03/07/2948892.html http://blog.csdn.net/showhilllee/article/details/27706679 http://blog.itpub.net/25851087/viewspace-1262468/
相关文章推荐
- 【github】2015.09.09 linux 命令行设置代理,连接github(Linux command line set http proxy for connecting github)
- Linux for github
- github for linux
- github for linux
- Linux Generating SSH keys for GitHub
- [Linux FAQ]init: Id "x" respawning too fast: disabled for 5 minutes
- APACHE+MYSQL+PHP FOR LINUX
- 在 Linux for iSeries® 上设置高可用性防火墙
- J2EE 1.4 application Server for Linux 安装与配置
- Linux程式设计-11.Shell Script(bash)--(5)控制圈for
- 流媒体Helix Server for linux 详细安装,配置
- APACHE+MYSQL+PHP FOR LINUX INSTALL SHELL
- VMWare GSX Server for Linux使用手记
- A few words for Magic Linux and other distros:
- [转]Visual Studio for Linux 来了!
- Firebird FOR LINUX
- J2EE 1.4 application Server for Linux 安装与配置
- Delphi for Linux中应用共享对象库
- Sybase ASE for Linux 免费了
- Oracle92 for Linux安装指南