わしがローカルに建てた gitlab とお話できなかった話
なんかうまく行かなかったので。
何も考えず gitlab のプロジェクトページからコマンドを拝借
[webuser@staging webroot]$ git clone http://local-no-gitlab.example.com/gituser/project.git Initialized empty Git repository in /var/www/webroot/.git/ error: The requested URL returned error: 401 Unauthorized while accessing http://local-no-gitlab.example.com/gituser/project.git/info/refs fatal: HTTP request failed
だめじゃねーか!ふざけんな!
※ちなみに、この作業サーバ(ホスト名:staging)と http://local-no-gitlab.example.com/ は物理的に別サーバです。アドレスは hosts で解決できていて正常に参照できるものとします。
アクセス方法が違う
プロジェクトの公開状態が、公開(public)ではなく内部(local?日本語パッチあてたから元の表記わからぬ)だったのが問題で、そもそも他の git システムも同じ問題があるもよう。この状態でアクセスさせるには、アドレス部分を「http://<ユーザ名>@アドレス」とする必要がある模様。ステータスに合わせてコマンドの表記も変えなさいよプンスコ!
[webuser@staging webroot]$ git clone http://root@local-no-gitlab.example.com/gituser/project.git Initialized empty Git repository in /var/www/webroot/.git/ (gnome-ssh-askpass:16355): Gtk-WARNING **: cannot open display:
Damm it!!
そして解決へ
[webuser@staging webroot]$ unset SSH_ASKPASS
参考:コンソール越しに git コマンドから Gtk-WARNING **: cannot open display と怒られた時 - Qiita
[webuser@staging webroot]$ git clone http://root@local-no-gitlab.example.com/gituser/project.git Initialized empty Git repository in /var/www/webroot/.git/ Password:
やったぜ。