kali linux 下搭建git服务器
参考:http://www.cnblogs.com/dee0912/p/5815267.html
https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/00137583770360579bc4b458f044ce7afed3df579123eca000
1、安装git:
kali自带,(apt-get install git)
2、添加git服务用户
useradd git
passwd git
我的用户名密码都git,方便记忆
3、创建git仓库:
/home/git
su git(关键)
mkdir some.git
git init --bare some.git
其中git目录下的操作要切换到git用户下,否则客户端提交(push)代码会报错
4、客户端clone代码:
git clone git@serverip:/home/git/some.git
5、在服务器的git目录下创建
touch -p .ssh/authorized_keys
6、客户端生成秘钥:
ssh-keygen -t rsa -C "yoou_email@gmail.com"
WIN(C:\Users\用户名\.ssh ),LINUX(/root/.ssh/)下会多出两个文件 id_rsa 和 id_rsa.pub
如果有可以跳过,可以直接用之前的比如github的。
7、把公钥复制到服务器的authorized_keys文件中
ssh git@serverip 'cat >> /home/git/.ssh/authorized_keys' < ~/.ssh/id_rsa.pub
8、至此,客户端可以提交代码
9、如果报错:Could not read from remote repository
kali linux 下搭建git服务器的更多相关文章
- 【转】在Linux下搭建Git服务器
在 Linux 下搭建 Git 服务器 环境: 服务器 CentOS6.6 + git(version 1.7.1)客户端 Windows10 + git(version 2.8.4.windows. ...
- 在Linux下搭建Git服务器的方法是什么样?
第一步 安装git:可以通过命令的方式快速安装,不同的linux的安装方法可能不一样,我的是采用的yum方法.ubuntu可以用apt-get命令.sudo yum install git 第二步 添 ...
- 在 Linux 下搭建 Git 服务器
环境: 服务器 CentOS6.6 + git(version 1.7.1)客户端 Windows10 + git(version 2.8.4.windows.1) ① 安装 Git Linux 做为 ...
- 在 Linux 下搭建 Git 服务器(yum安装)
服务端(linux): 1. 安装git [root@localhost ~]# yum -y install git 2. 增加一个git账户 为了管理的方便,在linux下面增添一个 " ...
- 在Linux下搭建Git服务器步骤
环境: 服务器 CentOS6.6 + git(version 1.7.1) 客户端 Windows10 + git(version 2.8.4.windows.1) ① 安装 Git Linux ...
- Linux下搭建Git服务器
1.安装Git 见 Jenkins持续集成环境部署 第四节 2.创建Git用户和用户组 groupadd git useradd git -g git 3.创建证书切换到git用户创建证书 su gi ...
- Linux 下搭建Git 服务器详细步骤
参考: https://www.cnblogs.com/dee0912/p/5815267.html#_label0 https://blog.csdn.net/carfge/article/deta ...
- 在Linux下搭建git服务器
http://www.cnblogs.com/dee0912/p/5815267.html 步骤很详细,很受用
- Windows下搭建Git 服务器: BONOBO GIT SERVER + TortoiseGit
本文将介绍如何在Windows操作系统下搭建Git服务器和客户端.服务器端采用的是Bonobo Git Server,一款用ASP.NET MVC开发的Git源代码管理工具,界面简洁,基于Web方式配 ...
随机推荐
- hdu 4417 Super Mario (主席树)
链接:http://acm.hdu.edu.cn/showproblem.php?pid=4417 题意: 给你段长为n的序列,有q个询问,每次询问区间[l.r]内有多少个数小于等于k 思路: 之前用 ...
- day28 property 装饰器
方法属性装饰器 本质上来说就是将方法的执行括号去掉,这样将一个方法掩饰成了一个变量名字,变成了类似属性的东西内置装饰器函数,只在面向对象中使用 from math import pi class Cr ...
- 解析 Android Things 技术原理
2012 年 6 月,由 IoT-GSI(Global Standards Initiative on Internet of Things)发布的白皮书“ITU-T Y.4000/Y.2060”[1 ...
- BZOJ 4009: [HNOI2015]接水果
4009: [HNOI2015]接水果 Time Limit: 60 Sec Memory Limit: 512 MBSubmit: 636 Solved: 300[Submit][Status] ...
- 【转】cJSON 使用笔记
缘 起 最近在stm32f103上做一个智能家居的项目,其中选择的实时操作系统是 rt_thread OS v1.2.2稳定版本,其中涉及到C和java(android)端数据 ...
- 【洛谷P3600】 随机数生成器
https://www.luogu.org/problem/show?pid=3600#sub (题目链接) 题意 一个$n$个数的序列,里面每个数值域为$[1,X]$.给$q$个区间,每个区间的权值 ...
- I/O多路复用详解
要想完全理解I/O多路复用,需先要了解I/O模型: 一.五种I/O模型 1.阻塞I/O模型 最流行的I/O模型是阻塞I/O模型,缺省情形下,所有套接口都是阻塞的.我们以数据报套接口为例来讲解此模型(我 ...
- CodeBlocks: 生成的exe文件自定义一个图标
CodeBlocks生成的exe文件的图标默认是系统图标,如何自定义一个漂亮的小图标呢? 我是C菜鸟,平时只用CodeBlocks练习c,也不开发什么软件,这个问题就难倒我了. 到网上搜索了一下,发现 ...
- Problems you may meet
一.正确安装sklearn却提示No module named 'sklearn.lda' It seems that you have installed a newer version of sk ...
- Git-Credential-Manager-for-Mac-and-Linux
1.安装brew 安装命令: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/instal ...
