1、求助關於在阿里雲上執行git clone的問題
使用方法就是git clone 然後加你的地址就好了呀,如果你拉取國外源碼的時候特別慢那麼你也不用驚訝,因為阿里雲使用的是電信出口,電信出口那情況肯定是眾所周知的慢。。。
2、阿里雲伺服器 怎麼用git部署代碼
使用阿里雲Ubuntu 12.0.4 64位操作系統做git伺服器。
首先git伺服器有兩種訪問方式可以選擇:http方式和ssh的方式,http方式更容易使用。
1、http方式的git伺服器搭建以及使用git命令行訪問:
On the Server
1) Install Ubuntu Server, this is the base of our git server obviously
2) Now we need to install a couple of packages, these being 『git-core』 and 『apache2′, we do this like so:-
apt-get update
apt-get install apache2 git-core
3) Now we need to create a new folder for your new repository and set some inital permissons, we do this like so:-
cd /var/www
mkdir test-repo.git
cd test-repo.git
git --bare init
git update-server-info
chown -R www-data.www-data .
4) We now need to enable WebDAV on Apache2 of which we will use to serve the repository:-
a2enmod dav_fs
5) We now need to configure the access restrictions to our repository by creating the following file:-
/etc/apache2/conf.d/git.conf
Then fill it in with the following content:-
<Location /test-repo.git>
DAV on
AuthType Basic
AuthName "Git"
AuthUserFile /etc/apache2/passwd.git
Require valid-user
</Location>
Then save and close the file, lets move on to the next bit..
6) Next we need to create a user account of which you will need to use to browse of commit to the repository..
htpasswd -c /etc/apache2/passwd.git <user>
You could then be prompted to enter the password for the user too and confirm it!
7) Ok that』s it for the server side configuration… we just need to restart Apache2 like so and then we should be ready to move on to the client side stuff!
/etc/init.d/apache2 restart
…you can now move on to the client side stuff!
On the client side
Ok so now we need to create a local (on your desktop machine) repository and then we』ll initiate the new remote repository… So, if your using Linux/MacOSX bring up the terminal and type the following commands:-
mkdir ~/Desktop/test-project
cd ~/Desktop/test-project
git init
git remote add origin http://<user>@<server name or IP address>/test-project.git
touch README
git add .
git commit -a -m 「Initial import」
git push origin master
Done! – Your intiial file named 『README』 which currently is just blank has now been committed and you』ve pushed your code to your new git server which has now completed the Git reposity creation process, now in future you can 『clone』 your resposity like so:-
git clone <user>@<server name or IP address>/test-project.git
注意上面連接http://<user>@<server name or IP address>/test-project.git中的user就是你htpasswd -c /etc/apache2/passwd.git <user>輸入的用戶名。
另外新建倉庫的時候,只需執行:
cd /var/www
mkdir 項目名
cd 項目名
git --bare init
git update-server-info
chown -R www-data.www-data .
然後在/etc/apache2/conf.d/git.conf中對應添加上面類似段即可。
其中:
AuthUserFile 密碼文件名
後面的文件就是你指定的密碼文件,你可以
htpasswd -c 密碼文件名 <user>
對應指定該項目的用戶名和密碼即可。添加用戶是不要-c參數:
htpasswd 密碼文件名 <user>
3、怎麼在阿里雲伺服器搭建gitlab
和本地搭建一樣的,我之前也搭建過
雖然整個搭建過程無比之艱辛,幾乎佔用了我一天的時間,但是最後搭好了,還是很開心滴。最後,如果你買的是512M的乞丐版阿里雲,建議一定要升級至1024M內存,同時創建sawpfile,大小1G就夠了,否則跑不動就只能呵呵了。
4、阿里雲的伺服器安裝Gitlab有成功的嗎
這個沒有試過,應當可以吧。。
5、如何訪問GitLab默認安裝的PostgreSQL資料庫
將GitLab的資料庫導入阿里雲PostgreSQL RDS
GitLab的資料庫用的是PostgreSQL,之前由於阿里雲RDS不支持PostgreSQL,只能將GitLab的資料庫部署在雲伺服器上。
6月1日得知阿里雲推出了PostgreSQL RDS,於是立馬將GitLab的資料庫遷移至PostgreSQL RDS。
下面分享一下遷移的主要操作步驟:
1)在GitLab伺服器上備份GitLab資料庫
操作命令:
sudo gitlab-rake gitlab:backup:create SKIP=db
註:這個命令原本是只備份資料庫,但實際運行時也會備份repositories,可以在完成資料庫備份時,ctrl+C直接退出。
資料庫備份成功後,會在 /var/opt/gitlab/backups/db 文件夾中看到 database.sql 文件,導入時只需將這個文件導入到阿里雲RDS。
2)在阿里雲RDS中創建GitLab的資料庫帳戶與資料庫
在阿里雲RDS控制台首頁點擊逗登錄資料庫地,進入idb.rds.aliyun.com,選擇對應的PostgreSQL實例。
a)創建2個帳戶:gitlab, gitlab-psql
b)創建gitlabhq_proction資料庫,所有者為gitlab。
3) 在GitLab伺服器上進行導入操作
a) cd /var/opt/gitlab/backups/db
b) psql -h [RDS實例網址] p 3433 -d gitlabhq_proction -U gitlab -f database.sql
6、怎麼連接gitlab的資料庫
將GitLab的資料庫導入阿里雲PostgreSQL RDS
GitLab的資料庫用的是PostgreSQL,之前由於阿里雲RDS不支持PostgreSQL,只能將GitLab的資料庫部署在雲伺服器上。
6月1日得知阿里雲推出了PostgreSQL RDS,於是立馬將GitLab的資料庫遷移至PostgreSQL RDS。
下面分享一下遷移的主要操作步驟:
1)在GitLab伺服器上備份GitLab資料庫
操作命令:
sudo gitlab-rake gitlab:backup:create SKIP=db
註:這個命令原本是只備份資料庫,但實際運行時也會備份repositories,可以在完成資料庫備份時,ctrl+C直接退出。
資料庫備份成功後,會在 /var/opt/gitlab/backups/db 文件夾中看到 database.sql 文件,導入時只需將這個文件導入到阿里雲RDS。
2)在阿里雲RDS中創建GitLab的資料庫帳戶與資料庫
在阿里雲RDS控制台首頁點擊「登錄資料庫」,進入idb.rds.aliyun.com,選擇對應的PostgreSQL實例。
a)創建2個帳戶:gitlab, gitlab-psql
b)創建gitlabhq_proction資料庫,所有者為gitlab。
3) 在GitLab伺服器上進行導入操作
a) cd /var/opt/gitlab/backups/db
b) psql -h [RDS實例網址] p 3433 -d gitlabhq_proction -U gitlab -f database.sql
7、如何在阿里雲linux伺服器安裝git
Gentoo: emerge gitCentos: yum install gitUbuntu: apt-get install gitDebian: apt-get install git其它:下載源代碼包,然後編譯安裝,或版者用其它的包管理制。權
8、阿里雲創建了git庫 為什麼地址無效
第一,抄下載並安裝git 目前windows版本的git有幾種實現,但我們選擇msysgit發行版,這是目前做得兼容性最好的。 使用默認配置安裝Git。這個不用多說,一路Next就可以,如果對各種選項不熟悉,建議使用默認配置,沒問題的。
9、小公司搭建gitlab,應該選擇哪一種阿里雲伺服器
只跑gitlab一個應用的話至少保證雙核4G以上的配置。如果還想跑一跑別的應用的話,那麼4核8G以上開始考慮吧。
10、怎麼在阿里雲上搭建git伺服器
小鳥雲伺服器niaoyun實例創建好之後,您可以使用以下任意一種方式登錄伺服器:
遠程桌面連接(,MSTSC):採用這種方式登錄,請確保實例能訪問公網。如果在創建實例時沒有購買帶寬,則不能使用遠程桌面連接。
管理終端VNC:無論您在創建實例時是否購買了帶寬,只要您本地有網頁瀏覽器,都可以通過管理控制台的管理終端登錄實例。
使用遠程桌面連接(MSTSC)登錄實例
打開開始菜單>遠程桌面連接,或在開始菜單>搜索中輸入mstsc。也可以使用快捷鍵Win+R來啟動運行窗口,輸入mstsc後回車啟動遠程桌面連接。
在遠程桌面連接對話框中,輸入實例的公網IP地址。單擊顯示選項。
輸入用戶名,如小鳥雲默認為niaoyun。單擊允許我保存憑據,然後單擊連接。這樣以後登錄就不需要手動輸入密碼了。