gitlab 可以push和clone,可是网页上无法显示

菜鸟上road 发布于 2015/12/21 18:32
阅读 1K+
收藏 0
采用centos6.5,按照网上的教程搭建gitlab。登陆gitlab网站后创建项目,进入下图
 
 


按照上述过程push,显示/home/git/root/demo2.git is not repository.然后在网上查询资料得到下面方法
先在 server端,进入git用户

[git@iZ28i3p708vZ root]$ ls

demo  demo2.git  demo2.wiki.git  demo.wiki.git  test.git  test.wiki.git

[git@iZ28i3p708vZ root]$ cd demo2.git/

[git@iZ28i3p708vZ demo2.git]$ git --bare init


Initialized empty Git repository in /home/git/repositories/root/demo2.git/
发现可以找到创建的demo2.git,然后初始化建立裸仓库,
再回客户端

yangyangdeMacBook-Air:~ yangyang$ mkdir demo2

yangyangdeMacBook-Air:~ yangyang$ cd demo2

yangyangdeMacBook-Air:demo2 yangyang$ git init

Initialized empty Git repository in /Users/yangyang/demo2/.git/

yangyangdeMacBook-Air:demo2 yangyang$ touch README

yangyangdeMacBook-Air:demo2 yangyang$ git add README

yangyangdeMacBook-Air:demo2 yangyang$ git commit -m 'first commit'

[master (root-commit) 1143a95] first commit

 1 file changed, 0 insertions(+), 0 deletions(-)

 create mode 100644 README

yangyangdeMacBook-Air:demo2 yangyang$ git remote add origin git@121.42.180.14:root/demo2.git

yangyangdeMacBook-Air:demo2 yangyang$ git push -u origin master

Counting objects: 3, done.

Writing objects: 100% (3/3), 203 bytes | 0 bytes/s, done.

Total 3 (delta 0), reused 0 (delta 0)

To git@121.42.180.14:root/demo2.git

 * [new branch]      master -> master

Branch master set up to track remote branch master from origin.

应该是推送成功,这时候执行clone的确可以克隆到本地仓库,可是gitlab网页上面显示的还是最开始那样。
折腾了一天了,实在不知道怎么回事,希望各位可以帮帮忙
加载中
0
无奈修罗
无奈修罗
楼主 解决了么》?知道什么原因么?
0
s
seamuszc

gitlab-rake cache:clear RAILS_ENV=production

运行该命令可以解决

返回顶部
顶部