With kerberos_enabled enabled the git clone default instructions are missing the git user

Summary

if kerberos_enabled is enabeled in gitlab.rb

gitlab_rails['kerberos_enabled'] = true

the cloning instruction is missing the git user.

e.g. for an example with project slug testing-cli-instructions-with-kerberos-ii

git clone https://:@your.gitlab.net:443/root/testing-cli-instructions-with-kerberos-ii.git

Steps to reproduce

Add gitlab_rails['kerberos_enabled'] = true to the gitlab.rb

What is the current bug behavior?

Missing git user.

What is the expected correct behavior?

git

git clone https://git.your.gitlab.net:443/root/testing-cli-instructions-with-kerberos-ii.git

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

System information System: Ubuntu 16.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.5.3p105 Gem Version: 2.7.6 Bundler Version:1.16.6 Rake Version: 12.3.2 Redis Version: 3.2.12 Git Version: 2.18.1 Sidekiq Version:5.2.3 Go Version: unknown

GitLab information Version: 11.7.5-ee Revision: ed04633 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.11 URL: https://astrachan-latest.asgks.net HTTP Clone URL: https://astrachan-latest.asgks.net/some-group/some-project.git SSH Clone URL: git@astrachan-latest.asgks.net:some-group/some-project.git Elasticsearch: yes Geo: yes Geo node: Primary Using LDAP: no Using Omniauth: yes Omniauth Providers: saml, bitbucket, github, kerberos_spnego

GitLab Shell Version: 8.4.4 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories
  • storage1: /srv/gitlab/storage1/repositories/repositories
  • storage2: /srv/gitlab/storage2/repositories/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check
Checking GitLab subtasks ...

Checking GitLab Shell ...

GitLab Shell: ... GitLab Shell version >= 8.4.4 ? ... OK (8.4.4) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK

Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Gitaly ...

Gitaly: ... default ... OK storage1 ... OK storage2 ... OK

Checking Gitaly ... Finished

Checking Sidekiq ...

Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Incoming Email ...

Incoming Email: ... Reply by email is disabled in config/gitlab.yml

Checking Incoming Email ... Finished

Checking LDAP ...

LDAP: ... LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab App ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... ... Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.5.3) Git version >= 2.18.0 ? ... yes (2.18.1) Git user has default SSH configuration? ... yes Active users: ... 24 Elasticsearch version 5.6 - 6.x? ... yes (5.6.14)

Checking GitLab App ... Finished

Checking Geo ...

GitLab Geo is available ... yes GitLab Geo is enabled ... yes GitLab Geo secondary database is correctly configured ... not a secondary node Using database streaming replication? ... not a secondary node GitLab Geo tracking database is configured to use Foreign Data Wrapper? ... not a secondary node GitLab Geo tracking database Foreign Data Wrapper schema is up-to-date? ... not a secondary node GitLab Geo HTTP(S) connectivity ... not a secondary node HTTP/HTTPS repository cloning is enabled ... yes Machine clock is synchronized ... yes Git user has default SSH configuration? ... yes OpenSSH configured to use AuthorizedKeysCommand ... yes GitLab configured to disable writing to authorized_keys file ... no Try fixing it: You need to disable Write to authorized_keys file in GitLab's Admin panel For more information see: doc/administration/operations/fast_ssh_key_lookup.md GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... no Try fixing it: Please migrate all projects to hashed storage to avoid security issues and ensure data integrity. For more information see: doc/administration/repository_storage_types.md

Checking Geo ... Finished

Checking GitLab subtasks ... Finished

Possible fixes

Edited by 🤖 GitLab Bot 🤖