Gitlab

Gitlab

请求管理员为你开通帐号,你拥有一个帐号后做如下配置,就可以进行你的Gitlab之旅了。

建立安全链接

在你的工作区(工作计算机)和Gitlab之间建立一条安全通道

工作区生成SSH key

  • 查看SSH key是否已存在

    cat ~/.ssh/id_rsa.pub

  • 不存在则需要生成SSH key

    ssh-keygen -t rsa -C “[email protected]

  • 打印SSH key

    cat ~/.ssh/id_rsa.pub

这里会打印一串数值,将其复制。

在Gitlab上配置SSH key

  • 用帐号在浏览器登录Gitlab

  • 进入SSH Keys选项卡或可以猛击”这里”:http://192.168.88.99/profile/keys

  • 点击“Add SSH Key”,将刚才在工作区生成数值粘贴到Key输入框中保存。

创建项目

Gitlab上创建项目

在Gitlab上点击“New Project”创建一个工程,如:test

工作区的配置

以下这段在Gitlab上首次创建的Project首页上会有相关信息。

  • Git global setup:

git config –global user.name “liming fan”
git config –global user.email “[email protected]

  • Create Repository

mkdir test
cd test
git init
touch README
git add README
git commit -m ‘first commit’
git remote add origin [email protected]:pa/test.git
git push -u origin master


  • Existing Git Repo?

cd existing_git_repo
git remote add origin [email protected]:pa/test.git
git push -u origin master

升级 gitlab

见 “手动升级文档”:https://github.com/gitlabhq/gitlabhq/tree/master/doc/update 。如最新版本为 7.7,则查看其中的 6.x-or-7.x-to-7.7.md 。

你可能感兴趣的:(Linux)