Git on ZenTao Cloud

2014-12-30 15:28:37
wangyidong
9639
Last edited by John Ten on 2019-07-25 16:06:51
Summary :This article is about how to use ZenTao Cloud Git hosting.

ZenTao Cloud has GIT hosting service. Read the instruction below to use it.


1. Click "Console”->"Manage Git".

Fill in your GIT admin user name and password, and click "Start(Open)".


Then GIT will be available within one minute. The default setting is this admin had privileges to read and write all repositories on this site.


2. Create netrc

     In repository, Git use the netrc file to confirm username and password. Windows use _netrc , while Linux use  .netrc. The followings are about how to create netrc.

  

     Windows:

     1) Go to “Start"->"Run” and open %USERPROFILE%. Create “_netrc” file.

     2) Open _netrc in Notebook and enter Git server name, user name, password , and Save. For example,

machine xxx.zentao.pm login xxx
password xxx
    xxx is your Git address, user name , and password.

   

     Linux:

    Create .netrc on root directory and edit it as

machine xxx.zentao.pm
login xxx
password xxx
    xxx is your Git address, user name, and password.

 

3. Create a branch

 In Linux, run the followings,

#initialize repository 
mkdir test  
cd test
git init

#create readme and add to local
touch readme
git add readme
git commit

#add git origin and push to master
git remote add origin https://xxx.zentao.pm/zentao.git/
git push origin master

If error: failed to push some refs to 'https://xxx.zentao.pm/git/qq.git', check whether netrc is created in the right way.

 

4. Testing

Clone Git repository:

git clone https://xxx.zentao.pm/git/xxx.git other

Check whether it is cloned.

 

Synchronization steps:

git fetch origin

git merge origin/master

    Comment List
    常昕 2016-11-11 13:42:57
    我们内部自建了私有gitlab,云禅道能和我们自建的gitlab集成么?
    王春生 2016-11-15 09:04:09
    云禅道只能和云禅道的git集成。
    变通的方案是做同步。在云禅道开通一个git库,然后定期将gitlab里面的库同步到云禅道的git库。
    张海阳 2016-10-19 18:18:51
    是多少
    王春生 2016-10-26 09:00:00
    请问你是要问什么问题?
    1/1
    Write a Comment
    Comment will be posted once reviewed.