自己动手搭建Git服务器-SCM-Manager
生活随笔
收集整理的這篇文章主要介紹了
自己动手搭建Git服务器-SCM-Manager
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
基于配置簡單的原則,先試用一下
SCM-Manager
?
http://www.scm-manager.org/
?
看主頁介紹: Very easy installation 安裝簡單,配置方便,不需要額外的web服務(wù)器
一、服務(wù)器配置
到這里來依照文檔開始使用
https://bitbucket.org/sdorra/scm-manager/wiki/getting-started
首先下載最新版本的服務(wù)器版本
直接解壓縮后,目錄如下
E:\git\scm-server
在運(yùn)行之前,注意本機(jī)要首先安裝好java環(huán)境,并配置好,這個(gè)略過
運(yùn)行bin\scm-server.bat
在瀏覽器中鍵入地址?http://localhost:8080/scm/ 進(jìn)入登錄頁面
(話說tomcat和jetty服務(wù)器都喜歡默認(rèn)使用8080端口,
如果想要修改的話,就在config\server-config.xml文件中修改端口那一部分即可
)
用戶名/密碼:?scmadmin/scmadmin
登錄進(jìn)去之后,發(fā)現(xiàn)好像很強(qiáng)大的樣子,居然還支持Subversion,還能安裝各種各樣的插件
不管復(fù)雜的功能
首先配置一下Repository Types
Repository directory 修改到服務(wù)器目錄下?E:\git\scm-server\repositories\git
再去新建一個(gè)用戶,并注意設(shè)置可寫權(quán)限(對所有倉庫)
blankerer/123456
然后新建一個(gè)倉庫
name=ci?
于是得到一個(gè)url:?http://localhost:8080/scm/git/ci?
二、客戶端運(yùn)行
回到我們之前本地git管理的項(xiàng)目根目錄下
添加遠(yuǎn)程倉庫:
$ git remote add ci_local http://localhost:8080/scm/git/ci blank@BLANK-PC /e/lamp/Apache24/www/ci (master) 查看遠(yuǎn)程倉庫
$ git remote -v ci_local http://localhost:8080/scm/git/ci (fetch) ci_local http://localhost:8080/scm/git/ci (push)
向遠(yuǎn)程倉庫推送項(xiàng)目
$ 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 查看遠(yuǎn)程倉庫信息
$ 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) 以上兩步驟,在輸完命令敲回車之后,要等待很久(有好幾分鐘呢)才會提示輸入用戶名和密碼,不知道什么緣故
特別提示:?
最后經(jīng)過我的精密檢查,發(fā)現(xiàn),原來一開始運(yùn)行scm服務(wù)器的java版本是32位的
后來,換了64為的java7來運(yùn)行服務(wù)器,速度就不是問題了,運(yùn)行命令后,馬上就提示輸入用戶名密碼了
另外,如果不想每次輸入用戶名的話
在添加遠(yuǎn)程倉庫時(shí),把用戶名放在url中即可:
git remote add ci_local http://blankerer@localhost:8080/scm/git/ci
當(dāng)然了,如果連密碼也不想每次輸入,那么把密碼也放在url中
git remote add ci_local http://blankerer:123456@localhost:8080/scm/git/ci
刪除遠(yuǎn)程倉庫
$ 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服務(wù)器
一、服務(wù)器配置
到這里來依照文檔開始使用
https://bitbucket.org/sdorra/scm-manager/wiki/getting-started
首先下載最新版本的服務(wù)器版本
直接解壓縮后,目錄如下
E:\git\scm-server
在運(yùn)行之前,注意本機(jī)要首先安裝好java環(huán)境,并配置好,這個(gè)略過
運(yùn)行bin\scm-server.bat
在瀏覽器中鍵入地址?http://localhost:8080/scm/ 進(jìn)入登錄頁面
(話說tomcat和jetty服務(wù)器都喜歡默認(rèn)使用8080端口,
如果想要修改的話,就在config\server-config.xml文件中修改端口那一部分即可
)
用戶名/密碼:?scmadmin/scmadmin
登錄進(jìn)去之后,發(fā)現(xiàn)好像很強(qiáng)大的樣子,居然還支持Subversion,還能安裝各種各樣的插件
不管復(fù)雜的功能
首先配置一下Repository Types
Repository directory 修改到服務(wù)器目錄下?E:\git\scm-server\repositories\git
再去新建一個(gè)用戶,并注意設(shè)置可寫權(quán)限(對所有倉庫)
blankerer/123456
然后新建一個(gè)倉庫
name=ci?
于是得到一個(gè)url:?http://localhost:8080/scm/git/ci?
二、客戶端運(yùn)行
回到我們之前本地git管理的項(xiàng)目根目錄下
添加遠(yuǎn)程倉庫:
點(diǎn)擊(此處)折疊或打開
點(diǎn)擊(此處)折疊或打開
向遠(yuǎn)程倉庫推送項(xiàng)目
點(diǎn)擊(此處)折疊或打開
點(diǎn)擊(此處)折疊或打開
特別提示:?
最后經(jīng)過我的精密檢查,發(fā)現(xiàn),原來一開始運(yùn)行scm服務(wù)器的java版本是32位的
后來,換了64為的java7來運(yùn)行服務(wù)器,速度就不是問題了,運(yùn)行命令后,馬上就提示輸入用戶名密碼了
另外,如果不想每次輸入用戶名的話
在添加遠(yuǎn)程倉庫時(shí),把用戶名放在url中即可:
git remote add ci_local http://blankerer@localhost:8080/scm/git/ci
當(dāng)然了,如果連密碼也不想每次輸入,那么把密碼也放在url中
git remote add ci_local http://blankerer:123456@localhost:8080/scm/git/ci
刪除遠(yuǎn)程倉庫
點(diǎn)擊(此處)折疊或打開
總結(jié)
以上是生活随笔為你收集整理的自己动手搭建Git服务器-SCM-Manager的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: TabHost 和 FragmentTa
- 下一篇: 关于库存 库存BAPI