結論
パーミッションに決まってるでしょ……。
状況
Jenkins で GitLab から git clone しようとしたところ、以下のようなエラーが出て大ハマりしました。
> git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* hudson.plugins.git.GitException: Command "git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: remote: HTTP Basic: Access denied fatal: Authentication failed for 'https://gitaddress/repository.git/'
認証関係かなあと思って URL にユーザ名とパスワードを埋め込んでみたり*1、Jenkins の認証設定をいじったりしたんですが、まあ GitLab 側の Permission が原因でした*2。
トークンを使えば必ずしも Public にしなくても大丈夫なようです。