日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 >

自己动手搭建Git服务器-SCM-Manager

發(fā)布時間:2025/3/20 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 自己动手搭建Git服务器-SCM-Manager 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
基于配置簡單的原則,先試用一下 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

在運行之前,注意本機要首先安裝好java環(huán)境,并配置好,這個略過
運行bin\scm-server.bat

在瀏覽器中鍵入地址?http://localhost:8080/scm/ 進入登錄頁面
(話說tomcat和jetty服務(wù)器都喜歡默認使用8080端口,
如果想要修改的話,就在config\server-config.xml文件中修改端口那一部分即可


用戶名/密碼:?scmadmin/scmadmin

登錄進去之后,發(fā)現(xiàn)好像很強大的樣子,居然還支持Subversion
,還能安裝各種各樣的插件
不管復(fù)雜的功能
首先配置一下Repository Types
Repository directory 修改到服務(wù)器目錄下?E:\git\scm-server\repositories\git

再去新建一個用戶,并注意設(shè)置可寫權(quán)限(對所有倉庫)
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)
  • 以上兩步驟,在輸完命令敲回車之后,要等待很久(有好幾分鐘呢)才會提示輸入用戶名和密碼,不知道什么緣故
    特別提示:?
    最后經(jīng)過我的精密檢查,發(fā)現(xiàn),原來一開始運行scm服務(wù)器的java版本是32位的
    后來,換了64為的java7來運行服務(wù)器,速度就不是問題了,運行命令后,馬上就提示輸入用戶名密碼了

    另外,如果不想每次輸入用戶名的話
    在添加遠程倉庫時,把用戶名放在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

    刪除遠程倉庫

    點擊(此處)折疊或打開

  • $ 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)
  • 總結(jié)

    以上是生活随笔為你收集整理的自己动手搭建Git服务器-SCM-Manager的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。