自己搭建git 代码服务器
使用git服务器的工程师都需要生成一个ssh的公钥
The authenticity of host 'localhost (::1)' can't be established.
RSA key fingerprint is eb:e3:e2:36:84:64:23:f2:b8:7b:a0:4c:ef:d4:9e:7d.
Are you sure you want to continue connecting (yes/no)?
Host key verification failed.
执行一下:$ssh localhost -o StrictHostKeyChecking=no
(用ssh登录一下就好使,就不会弹出The authenticity of host 'localhost (::1)' can't be established.的错误了。)
然后再退出ssh登录。
然后:
a@ubuntu:~/linux-2.6$ git push origin master
Counting objects: 56913, done.
Compressing objects: 100% (56081/56081), done.
Writing objects: 100% (56913/56913), 150.96 MiB | 4.08 MiB/s, done.
Total 56913 (delta 4433), reused 0 (delta 0)
To git@localhost:/home/git/work/project.git
* [new branch] master -> master
a@ubuntu:~/linux-2.6$ ls
就好了。
小组内开发者b下载代码时:
b@ubuntu:~$ git clone git@localhost:/home/git/work/project.git
Initialized empty Git repository in /home/b/project/.git/
The authenticity of host 'localhost (::1)' can't be established.
RSA key fingerprint is eb:e3:e2:36:84:64:23:f2:b8:7b:a0:4c:ef:d4:9e:7d.
Are you sure you want to continue connecting (yes/no)?
Host key verification failed.
fatal: The remote end hung up unexpectedly
b@ubuntu:~$
同样执行一下:
b@ubuntu:~$ ssh localhost -o StrictHostKeyChecking=no
b@ubuntu:~$ git clone git@localhost:/home/git/work/project.git
Initialized empty Git repository in /home/b/project/.git/
git@localhost's password:
remote: Counting objects: 56913, done.
remote: Compressing objects: 100% (51648/51648), done.
remote: Total 56913 (delta 4433), reused 56913 (delta 4433)
Receiving objects: 100% (56913/56913), 150.96 MiB | 13.48 MiB/s, done.
Resolving deltas: 100% (4433/4433), done.
Checking out files: 100% (53646/53646), done.
b@ubuntu:~$ ls
examples.desktop project
b@ubuntu:~$ ls
examples.desktop project
b@ubuntu:~$
b@ubuntu:~$
b@ubuntu:~$ cd project/
b@ubuntu:~/project$ ls
arch crypto include kernel net security
block Documentation init lib README sound
certs drivers ipc MAINTAINERS REPORTING-BUGS tools
COPYING firmware Kbuild Makefile samples usr
CREDITS fs Kconfig mm scripts virt
分析 ssh localhost -o StrictHostKeyChecking=no可能不会检查公钥的正确性就让登录了。
自己搭建git 代码服务器的更多相关文章
- 搭建git代码服务器
在代码管理中,通常需要使用版本管理工具,git就是一个不错的选择,这里简单罗列一下git服务器的搭建过程. 1. 安装git工具包 2. 初始化git库:在代码服务器上,通常只需要创建一个不含有工作目 ...
- 搭建Git本地服务器
搭建Git本地服务器 参考文章:http://www.ossxp.com/doc/git/gitolite.html 当前任务,学习中... 公司小范围用法: 服务器上做的: .在服务器上建立一个用户 ...
- git 代码服务器的网页版gitweb的搭建
sudo apt-get install apache2 git-core gitwebsudo a2enmod rewrite #vi /etc/gitweb.conf $projectroot = ...
- 在家用机上搭建 Git https 服务器
今天主要叙述在家里台式机的虚拟机上搭建支持 https 的 ubuntu git 服务器. 实际上,从一个用户请求家里 git 服务器代码,最终完成代码的传输,主要是通过以下的过程: 首先,从外界寻找 ...
- 搭建git远程服务器三步骤
以前都是使用git,这次由于工作需要,需要自己搭建一个远程git服务器.根据网上的 介绍,捣鼓了一下午,终于把远程git服务器搞定了,这里,做个总结. 搭建git远程服务,首先要安装git和ssh,以 ...
- CentOS 6.8 搭建 Git 代码托管系统 Gitea
[荐] Gitea:Git with a cup of tea,在 Gogs 基础上,发展起来的 自助 Git 服务系统.Gogs是一个个人维护的版本,而Gitea是一个社区组织维护的,版本迭代更新快 ...
- CENTOS下搭建git代码仓库 ssh协议
centos服务器下搭建git仓库,使用ssh协议管理仓库代码权限 git官网(http://git-scm.com/) 使用ssh协议: 一.安装git,使用yum install git 或 ...
- win7本地搭建git ssh服务器
本来是想在gogs上用ssh的,结果弄了好几次还没整明白,希望等他们的更新内置吧. 但是,意外收获,还是成功搭建了本地ssh服务器,只是没有和gogs成功关联. 简要记录一下: 主要软件: msysg ...
- Linux 上搭建 git 的服务器
搭建服务器 假设服务器的名字是 git.example.com. 首先,添加一个叫做git的用户adduser git. 然后如果不存在的话, 为这个用户新建一个主目录mkdir /home/git, ...
随机推荐
- OpenStack-Ocata版+CentOS7.6 云平台环境搭建 — 1.操作系统环境配置
1.OpenStack示例的架构介绍 1.1 各节点介绍 (1)控制节点(controller)控制节点(controller)上运行身份服务,镜像服务,计算节点管理,网络管理,各种网络代理和仪表板. ...
- Python模块学习 - fabric
简介 fabric是一个Python的库,同时它也是一个命令行工具.使用fabric提供的命令行工具,可以很方便地执行应用部署和系统管理等操作. fabric依赖于paramiko进行ssh交互,fa ...
- 转载 Python中关键字global与nonlocal的区别
转载自CSDN 雁丘1990, 原文地址: https://blog.csdn.net/xcyansun/article/details/79672634 这篇文章写的很赞, 条理清晰, 分析循序渐进 ...
- Linux中matplotlib 中文显示问题解决
1.下载下载中文 arial unicode ms 字体到 /home 目录 2. 拷贝字体到 usr/share/fonts 下: sudo cp ~/arial\ unicode\ ms.ttf ...
- 【sping揭秘】18、使用spring访问数据
统一的数据访问异常层次体系 基于基本的jdbc封装dao层访问接口,封装不论是访问,csv文件,关系数据库(RDBMS),ladp都可以封装成一个个DAO对象来进行访问 抛出问题 可是对于我们忽略了一 ...
- 微服务开发有道之把项目迁移到Kubernetes上的5个小技巧
我们将在本文中提供5个诀窍帮你将项目迁移到Kubernetes上,这些诀窍来源于过去12个月中OpenFaas社区的经验.下文的内容与Kubernetes 1.8兼容,并且已经应用于OpenFaaS ...
- python之使用PIL模块制作随机验证码
制作随机验证码,需要如下知识点: 1.随机验证码的制作(这里用的是random模块随机产生字符) 2.图片的制作 3.随机直线干扰项 4.其他随机干扰项 代码如下: from PIL import I ...
- Excel设置excel打印每页都有表头标题
Excel设置excel打印每页都有表头标题
- Ubuntu 16.04下如何安装VMware-Workstation
一.下载 下载地址:https://my.vmware.com/cn/group/vmware/details?downloadGroup=WKST-1411-LX&productId=686 ...
- SQL 必知必会·笔记<1>了解SQL
1.1 基本概念 数据库(DataBase) 保存有组织的数据库的容器(通常是一个文件或一组文件). 表(Table) 某种特定数据类型的结构化清单. 模式(Schema) 关于数据库和表的布局及特性 ...