linux环境下配置github 远程仓库
2016-07-21 15:31
369 查看
1.设置git用户和邮箱
git config --global user.name "fujinzhou"
git config --global user.email "1445675350@qq.com"
2.生成SSH密钥
ssh-keygen -t rsa //直接敲3次回车,默认key放在/root/.ssh/下
3.在github上添加ssh密钥
cat /root/.ssh/id_rsa.pub //复制到github上(Settings-->SSH andGPG keys-->New SSH key),title随意
4.测试认证是否成功
[root@localhost data]# ssh -T git@github.com
The authenticity of host 'github.com (192.30.253.113)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.253.113' (RSA) to the list of known hosts.
Hi fujinzhou! You've successfully authenticated, but GitHub does not provide shell access.
5.克隆代码
git clone ssh://git@github.com/51reboot/actual-10-homework.git
git pull origin master 从git 拉代码
git常用命令
查看工作状态、
git status
提交所有代码
git add .
本地提交
git commit -m "test"
提交到远程
git push origin master
本文出自 “不抛弃!不放弃” 博客,请务必保留此出处http://thedream.blog.51cto.com/6427769/1828437
git config --global user.name "fujinzhou"
git config --global user.email "1445675350@qq.com"
2.生成SSH密钥
ssh-keygen -t rsa //直接敲3次回车,默认key放在/root/.ssh/下
3.在github上添加ssh密钥
cat /root/.ssh/id_rsa.pub //复制到github上(Settings-->SSH andGPG keys-->New SSH key),title随意
4.测试认证是否成功
[root@localhost data]# ssh -T git@github.com
The authenticity of host 'github.com (192.30.253.113)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.253.113' (RSA) to the list of known hosts.
Hi fujinzhou! You've successfully authenticated, but GitHub does not provide shell access.
5.克隆代码
git clone ssh://git@github.com/51reboot/actual-10-homework.git
git pull origin master 从git 拉代码
git常用命令
查看工作状态、
git status
提交所有代码
git add .
本地提交
git commit -m "test"
提交到远程
git push origin master
本文出自 “不抛弃!不放弃” 博客,请务必保留此出处http://thedream.blog.51cto.com/6427769/1828437
相关文章推荐
- linux 查看CPU个数,核数
- linux环境下配置github远程仓库
- Linux下chkconfig命令详解
- Enable FileStore and DataStore for CKAN on CentOS6.8
- 通过局域网安装centos6.4
- Linux权限体系总结
- linux进程的堆栈空间_代码段(指令,只读)、数据段(静态变量,全局变量)、堆栈段(局部变量)、栈【转】
- Linux 特殊权限位
- Linux 权限基础说明
- 关于java应用MD5校验文件和linux下md5Linux校验文件结果一致问题。
- linux iostat 性能指标说明
- Linux发展编年表
- Linux程序包管理
- linux删除、读取文件原理
- linux创建用户
- linux 文件类型
- LINUX 目录结构
- LINUX开机启动过程
- 安装centos 6.7
- Linux 命令无法正常使用