<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>mmap</title>
    <link>https://ruby-china.org/mmap</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>GitLab 的项目 ssh 地址和 ssh 方式 push 问题</title>
      <description>&lt;p&gt;在一台内网服务器上安装 gitlab 4.2 stable, 按照&lt;a href="https://github.com/gitlabhq/gitlabhq/blob/4-2-stable/doc/install/installation.md" rel="nofollow" target="_blank"&gt;https://github.com/gitlabhq/gitlabhq/blob/4-2-stable/doc/install/installation.md&lt;/a&gt;
安装完后，运行
sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production
全部绿色通过。
启动时/etc/init.d/gitlab 脚本运行有问题，因此改为按
sudo -u gitlab -H bundle exec unicorn_rails -c $DAEMON_OPTS -E production&amp;amp;
启动，启动后页面显示，创建新用户，登录，创建新组织，新项目等均正常。
问题在于：
新建一个名为 test 的项目后，在另一台机器（与服务器处于同一内网）按照 gitlab 给出的 test 项目 ssh 地址，运行 git clone git@192.168.1.254:test/test.git
会提示 fatal: 'test/test.git' does not appear to be a git repository
猜测可能是目录位置不对，于是运行
git clone git@192.168.1.254:repositories/test/test.git
可以成功 clone（提示 Cloning into 'test'...
warning: You appear to have cloned an empty repository.)
但是会出现第二个问题
在 git init 随便 commit 一个文件后 push 回 server 时
会提示
Counting objects: 3, done.
Writing objects: 100% (3/3), 197 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: Empty compile time value given to use lib at hooks/update line 10
remote: Use of uninitialized value in require at hooks/update line 11.
remote: Can't locate Gitolite/Hooks/Update.pm in &lt;a href="/INC" class="user-mention" title="@INC"&gt;&lt;i&gt;@&lt;/i&gt;INC&lt;/a&gt; (&lt;a href="/INC" class="user-mention" title="@INC"&gt;&lt;i&gt;@&lt;/i&gt;INC&lt;/a&gt; contains:  /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at hooks/update line 11.
remote: BEGIN failed--compilation aborted at hooks/update line 11.
remote: error: hook declined to update refs/heads/master
To git@192.168.1.254:repositories/test/test.git
 ! [remote rejected] master -&amp;gt; master (hook declined)
error: failed to push some refs to 'git@192.168.1.254:repositories/test/test.git'&lt;/p&gt;

&lt;p&gt;我搜索到了 5 个月前的一个类似问题&lt;a href="https://github.com/gitlabhq/gitlabhq/pull/1719#issuecomment-9731139" rel="nofollow" target="_blank"&gt;https://github.com/gitlabhq/gitlabhq/pull/1719#issuecomment-9731139&lt;/a&gt;
按照&lt;a href="/saito" class="user-mention" title="@saito"&gt;&lt;i&gt;@&lt;/i&gt;saito&lt;/a&gt;的建议，运行 sudo usermod -a -G gitlab git 也没能解决问题&lt;/p&gt;

&lt;p&gt;我把 gitlab.yml 中与 gitolite 有关的部分贴出来，请大家帮忙看下有什么问题&lt;/p&gt;
&lt;h2 id="Gitolite settings"&gt;Gitolite settings&lt;/h2&gt;
&lt;p&gt;gitolite:
  admin_uri: git@localhost:gitolite-admin&lt;/p&gt;

&lt;p&gt;# REPOS_PATH MUST NOT BE A SYMLINK!!!
  repos_path: /home/git/repositories/
  hooks_path: /home/git/.gitolite/hooks/
  admin_key: gitlab
  upload_pack: true
  receive_pack: true
  ssh_user: git
  ssh_host: 192.168.1.254
  # ssh_port: 22
  # config_file: gitolite.conf&lt;/p&gt;

&lt;p&gt;# Uncomment and customize if you can't use the default group to own the repositories and run Gitolite (default: same as the 'ssh_user' above)
  # owner_group: group123&lt;/p&gt;</description>
      <author>mmap</author>
      <pubDate>Wed, 20 Mar 2013 11:00:52 +0800</pubDate>
      <link>https://ruby-china.org/topics/9592</link>
      <guid>https://ruby-china.org/topics/9592</guid>
    </item>
    <item>
      <title>刚接触实际工作中的 ruby 编程 有问题想请教</title>
      <description>&lt;p&gt;在看别人的代码的时候 有一个很大的不便 就是“找到某个方法或变量在哪里定义”很不方便，而且很多时候分不清这个方法（变量）在父类还是在子类定义 
我在用 emacs 的 ruby-mode，有没有比较好的方式？&lt;/p&gt;</description>
      <author>mmap</author>
      <pubDate>Sun, 04 Nov 2012 19:39:11 +0800</pubDate>
      <link>https://ruby-china.org/topics/6523</link>
      <guid>https://ruby-china.org/topics/6523</guid>
    </item>
  </channel>
</rss>
