Windowsファイルサーバ上にgitのベアリポジトリを建てたい

gitlabサーバを建てる金もないとのことで、ファイルサーバ上にgitベアリポジトリを建てたんだけど、プロジェクトメンバがpushできないという問題にドハマり中。どうすりゃいいんだ。

ファイルサーバは信頼を結んでいないドメインにあるので、UNCを開くためには先のドメインのユーザ名/パスワードを入力して、エクスプローラでリモートリポジトリの場所を開いておく。
または、net use /persistent:yes でユーザ名/パスワードをWindows資格情報マネージャに記録しておく。

ファイルサーバ上でフルコントロールを持っている人が git init --bare --shared=world repo.git してベアリポジトリを作成しておく。
repo.git フォルダとそのサブフォルダに、プロジェクトメンバのフルコントロールをつけておく。

[1] プロジェクトメンバが、そのUNCパスをエクスプローラで開いた状態で、別のローカルフォルダ上で Git GUI を使って file://fileserver.local/share$/共通/repos/repo.git
をクローンしようとすると、以下のエラーが出る:
remote: fatal: Unable to read current working directory: Permission denied
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
//fileserver.local/share$/共通/repos/repo.git
(file://なし) でも同様。
もちろんローカルフォルダのフルコントロールは持っている。Permission denied を吐いているのはきっとファイルサーバ側で動作している git-upload-packだ。

git bash で git clone file://fileserver.local/share$/共通/repos/repo.git
すると同様のエラーが出る。
git bash で git clone //fileserver.local/share$/共通/repos/repo.git
するとクローンできたとのこと。
Git GUI と git bash の動作が異なる。ここに一つ目の闇がある。

[2] pushするときにも似たようなエラーが出ている。
一つ目の例:
fatal: unable to get current working directory: Permission denied
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly

pushで失敗している二つ目の例:
fatal: unable to get current working directory: Permission denied
fatal: sha1 file '<stdout>' write error: Broken pipe
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly

[3] fetchに失敗している例:
remote: fatal: Unable to read current working directory: Permission denied
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: protocol error: bad pack header

問題なくpushまでできている人が二人(作成者以外にあと一人)いるのが悩ましい。その差が分からない。

推測。
gitはクライアントサーバで動作していて、リモートがファイルサーバにあってサーバプロセスがない場合でも同じようにプロセス間通信している。で、リモート側がファイルサーバ上のどこかのディレクトリ上で行動しようとしていて、そのディレクトリを読み書きできないために Unable to read current working directory: Permission denied
が出ている。
疑わしい場所:
-
//fileserver.local/share$/共通/repos/repo.git
にはプロジェクトメンバにもフルコントロールをつけているが、途中の//fileserver.local/share$/共通
は読取権限しかない。問題なくpushできる2人はフルコントロールを持っている。 - UNCに日本語が含まれている。git bash (MinGW)が日本語UNCをうまく解釈していない可能性。
- 一時的にエクスプローラで開く / ドライブレターとしてマウントしている /
net use /persistent:yes
している などの状況に差があるのかもしれない - 環境変数TMPやTEMPがあったりなかったりするのかもしれない。

CIFSを git bash で開いて ls -ld すると、rwxr-xr-x
になっている。
$ cd //fileserver.local/share$/共通/repos/repo.git
$ ls -ld objects
drwxr-xr-x 1 JAPAN+matobaa 4096 0 Nov 29 12:22 objects/
shared=world なので、ここが rwsr-xr-x
になっていればいいのかも……
$ chmod ug+s objects
$ ls -ld objects
drwxr-xr-x 1 JAPAN+matobaa 4096 0 Nov 29 12:22 objects/
変わんねぇ!!

ソースはここを読んでいる:
その前のここでフォークしている模様:
フォークした git-pack-objects
が Permission denied を踏んでいる、と推測。
お前はどこを current working directory にしているんだ。

git clone //fileserver.local/share$/共通/repos/repo.git
を以下のようにしたらpushまで出来た模様:
net use r: //fileserver.local/share$/共通 /persistent:yes
git clone /r/repos/repo.git
UNCがダメなのか、日本語パスがダメなのか、認証を永続化したのが効いたのか、途中のパスでフルコントロールがついてないのがダメなのか、切り分けられていないけれど、とりあえず、まるっと障害をスキップできた。