阿里云服务器上git配置与使用方法
来源:互联网 发布:天刀男捏脸数据导入 编辑:程序博客网 时间:2024/06/11 06:48
阿里云服务器搭建GIT服务器
环境:
- ubuntu16.04
- 阿里云服务器
二、服务器端配置
需要用root用户来执行以下命令
1. 添加用户
adduser git_xxxcd /home/git_xxxmkdir .ssh
2. 创建公钥文件
touch ./.ssh/authorized_keys
3. 添加用户公钥
vim ./.ssh/authorized_keys
4. 初始空的远程仓库
git init --bare sample_xxx.git
5. 文件修改拥有者
chown git_xxx:git_xxx sample_xxx.git
6. 禁止Git用户shell登录
vim /etc/passwd//修改git_db:x:1003:1003:,,,:/home/git_db:/bin/bash//为git_db:x:1003:1003:,,,:/home/git_db:/usr/bin/git-shell
二、远程仓库的使用方法
1.windows下在自己想要保存的文件夹下启动 git bash
输入命令
git clone git_xxx@120.78.209.0:/home/git_xxx/sample_xxx.git
如果显示以下,则表示成功,可以愉快的提交代码了。
warning: You appear to have cloned an empty repository.Checking connectivity... done.
阅读全文
0 0
- 阿里云服务器上git配置与使用方法
- 阿里云配置git服务器
- 在阿里云上搭建Git 服务器
- 阿里云服务器上建立网站的域名解析与配置(tomcat服务器)
- 在阿里云上搭建自己的git服务器
- 【阿里云服务器】在Centos6.5上安装与配置MySQL
- 阿里云服务器配置
- 阿里云git服务器搭建
- 在阿里云服务器上配置、更新yum
- 在阿里云服务器上安装配置svn
- 阿里云服务器centos7.3上配置redis--sentinel等
- 阿里云上安装Git
- 阿里云服务器怎么用 , 阿里云服务器的使用方法。
- 服务器上搭建git仓库与钩子hook的配置
- 一步步在阿里云的Ubuntu服务器上搭建自己的Git服务器
- 阿里云服务器上搭建git服务器(CentOS 系统)-有幸运卷
- ubuntu上配置git服务器
- ubuntu上配置git服务器
- python中的正则表达式
- java巧用软引用和弱引用避免OOM
- Sqoop相关---安装及使用
- 李超线段树
- Git与GitHub有什么区别?
- 阿里云服务器上git配置与使用方法
- JAVA语言的发展史
- linux远程免密登入
- 去除数组重复元素
- 2017.11.17 c语言基础与提高(四)
- MyBatis中 sql标签和include标签的使用
- css3属性选择器+实例
- 冒泡排序--Java代码示例
- servletContext对象之读取web项目下文件资源