自己动手搭建Git服务器-SCM-Manager
2016-12-10 10:55
274 查看
基于配置简单的原则,先试用一下SCM-Manager http://www.scm-manager.org/
看主页介绍:Very
easy installation 安装简单,配置方便,不需要额外的web服务器
一、服务器配置
到这里来依照文档开始使用
https://bitbucket.org/sdorra/scm-manager/wiki/getting-started
首先下载最新版本的服务器版本
直接解压缩后,目录如下
E:\git\scm-server
在运行之前,注意本机要首先安装好java环境,并配置好,这个略过
运行bin\scm-server.bat
在浏览器中键入地址 http://localhost:8080/scm/ 进入登录页面
(话说tomcat和jetty服务器都喜欢默认使用8080端口,
如果想要修改的话,就在config\server-config.xml文件中修改端口那一部分即可
)
用户名/密码: scmadmin/scmadmin
登录进去之后,发现好像很强大的样子,居然还支持Subversion,还能安装各种各样的插件
不管复杂的功能
首先配置一下Repository Types
Repository directory 修改到服务器目录下 E:\git\scm-server\repositories\git
再去新建一个用户,并注意设置可写权限(对所有仓库)
blankerer/123456
然后新建一个仓库
name=ci
于是得到一个url: http://localhost:8080/scm/git/ci
二、客户端运行
回到我们之前本地git管理的项目根目录下
添加远程仓库:
点击(此处)折叠或打开
$ git remote add ci_local http://localhost:8080/scm/git/ci
blank@BLANK-PC /e/lamp/Apache24/www/ci (master)
查看远程仓库
点击(此处)折叠或打开
$ git remote -v
ci_local http://localhost:8080/scm/git/ci (fetch)
ci_local http://localhost:8080/scm/git/ci (push)
向远程仓库推送项目
点击(此处)折叠或打开
$ git push ci_local master
Username for 'http://localhost:8080': blankerer
Password for 'http://blankerer@localhost:8080':
Counting objects: 226, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (217/217), done.
Writing objects: 100% (226/226), 3.37 MiB | 433.00 KiB/s, done.
Total 226 (delta 53), reused 0 (delta 0)
remote: Resolving deltas: 100% (53/53)
remote: Updating references: 100% (1/1)
To http://localhost:8080/scm/git/ci
* [new branch] master -> master
查看远程仓库信息
点击(此处)折叠或打开
$ git remote show ci_local
Username for 'http://localhost:8080': blankerer
Password for 'http://blankerer@localhost:8080':
* remote ci_local
Fetch URL: http://localhost:8080/scm/git/ci
Push URL: http://localhost:8080/scm/git/ci
HEAD branch: master
Remote branch:
master tracked
Local ref configured for 'git push':
master pushes to master (up to date)
以上两步骤,在输完命令敲回车之后,要等待很久(有好几分钟呢)才会提示输入用户名和密码,不知道什么缘故
特别提示:
最后经过我的精密检查,发现,原来一开始运行scm服务器的java版本是32位的
后来,换了64为的java7来运行服务器,速度就不是问题了,运行命令后,马上就提示输入用户名密码了
另外,如果不想每次输入用户名的话
在添加远程仓库时,把用户名放在url中即可:
git remote add ci_local http://blankerer@localhost:8080/scm/git/ci
当然了,如果连密码也不想每次输入,那么把密码也放在url中
git remote add ci_local http://blankerer:123456@localhost:8080/scm/git/ci
删除远程仓库
点击(此处)折叠或打开
$ git remote rm ci_local
blank@BLANK-PC /e/lamp/Apache24/www/ci (master)
$ git remote -v
blank@BLANK-PC /e/lamp/Apache24/www/ci (master)
看主页介绍:Very
easy installation 安装简单,配置方便,不需要额外的web服务器
一、服务器配置
到这里来依照文档开始使用
https://bitbucket.org/sdorra/scm-manager/wiki/getting-started
首先下载最新版本的服务器版本
直接解压缩后,目录如下
E:\git\scm-server
在运行之前,注意本机要首先安装好java环境,并配置好,这个略过
运行bin\scm-server.bat
在浏览器中键入地址 http://localhost:8080/scm/ 进入登录页面
(话说tomcat和jetty服务器都喜欢默认使用8080端口,
如果想要修改的话,就在config\server-config.xml文件中修改端口那一部分即可
)
用户名/密码: scmadmin/scmadmin
登录进去之后,发现好像很强大的样子,居然还支持Subversion,还能安装各种各样的插件
不管复杂的功能
首先配置一下Repository Types
Repository directory 修改到服务器目录下 E:\git\scm-server\repositories\git
再去新建一个用户,并注意设置可写权限(对所有仓库)
blankerer/123456
然后新建一个仓库
name=ci
于是得到一个url: http://localhost:8080/scm/git/ci
二、客户端运行
回到我们之前本地git管理的项目根目录下
添加远程仓库:
点击(此处)折叠或打开
$ git remote add ci_local http://localhost:8080/scm/git/ci
blank@BLANK-PC /e/lamp/Apache24/www/ci (master)
查看远程仓库
点击(此处)折叠或打开
$ git remote -v
ci_local http://localhost:8080/scm/git/ci (fetch)
ci_local http://localhost:8080/scm/git/ci (push)
向远程仓库推送项目
点击(此处)折叠或打开
$ git push ci_local master
Username for 'http://localhost:8080': blankerer
Password for 'http://blankerer@localhost:8080':
Counting objects: 226, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (217/217), done.
Writing objects: 100% (226/226), 3.37 MiB | 433.00 KiB/s, done.
Total 226 (delta 53), reused 0 (delta 0)
remote: Resolving deltas: 100% (53/53)
remote: Updating references: 100% (1/1)
To http://localhost:8080/scm/git/ci
* [new branch] master -> master
查看远程仓库信息
点击(此处)折叠或打开
$ git remote show ci_local
Username for 'http://localhost:8080': blankerer
Password for 'http://blankerer@localhost:8080':
* remote ci_local
Fetch URL: http://localhost:8080/scm/git/ci
Push URL: http://localhost:8080/scm/git/ci
HEAD branch: master
Remote branch:
master tracked
Local ref configured for 'git push':
master pushes to master (up to date)
以上两步骤,在输完命令敲回车之后,要等待很久(有好几分钟呢)才会提示输入用户名和密码,不知道什么缘故
特别提示:
最后经过我的精密检查,发现,原来一开始运行scm服务器的java版本是32位的
后来,换了64为的java7来运行服务器,速度就不是问题了,运行命令后,马上就提示输入用户名密码了
另外,如果不想每次输入用户名的话
在添加远程仓库时,把用户名放在url中即可:
git remote add ci_local http://blankerer@localhost:8080/scm/git/ci
当然了,如果连密码也不想每次输入,那么把密码也放在url中
git remote add ci_local http://blankerer:123456@localhost:8080/scm/git/ci
删除远程仓库
点击(此处)折叠或打开
$ git remote rm ci_local
blank@BLANK-PC /e/lamp/Apache24/www/ci (master)
$ git remote -v
blank@BLANK-PC /e/lamp/Apache24/www/ci (master)
相关文章推荐
- 搭建git服务器SCM-MANAGER
- 自己动手搭建Git服务器-Gitblit
- 搭建自己的git 代码服务器
- 搭建自己的Git服务器
- 使用 Gogs 搭建自己的 Git 服务器
- 在CentOS下搭建自己的Git服务器
- 记录自己在centos虚拟机搭建简易git服务器的过程,分享给大家
- 在ProjectLocker上搭建自己的GIT服务器
- 在服务器上搭建自己的Git仓库(摘录整合)
- 搭建git私有服务器及同步更新自己网站的文件
- [置顶] 自己动手安装turbogears -- 搭建基本Python web开发服务器环境
- 在CentOS下搭建自己的Git服务器
- 搭建自己的git 代码服务器
- 自己动手一步步搭建repo服务器
- 使用Google搭建自己的SVN或Git或Mercurial代码服务器之完美教程
- 2015-6-19-CentOS-6.5下搭建自己的Git服务器
- 自己搭建Git服务器并实现无密码访问.
- deepin下搭建自己的git服务器
- 亲自动手:利用Apache-FTPServer搭建自己的文件服务器
- git 服务器搭建,在自己服务器上搭建私有仓库