Create new project from a template: Error importing repository into [FILTERED] - comparison of String with 0 failed
Summary
GitLab Enterprise Edition 11.9.1-ee An error occurs during creating a project from a template. Repository is created, but no settings are imported from a template.
Steps to reproduce
There is a group Templates, in which I have a template project called Cookbook_Template. The visibility of this group is private, because is inherited from a parent group. I create a new project from a template. After creation I receive an email with the following message: Project Cookbook_Template couldn't be exported. The errors we encountered were: • Error importing repository into [FILTERED] - comparison of String with 0 failed
What is the current bug behavior?
I check the newly created repository and there are files copied from a template, but all settings are default - not copied from a template. Example settings, which are not copied:
- checkboxes from General->Merge requests
- Approvers and Approvals required in General-> Merge request approvals
- protected branch in Repository->Protected branches
What is the expected correct behavior?
All settings are copied from a template, of course except that listed in General->Export projects->The following items will NOT be exported
Relevant logs and/or screenshots
importer.log
{"severity":"ERROR","time":"2019-05-22T09:56:02.296Z","correlation_id":"LCtzvwLDws2","importer":"Import/Export","import_jid":null,"project_id":3226,"project_path":"cicd/Chef/Templates/cookbook_template","message":"Error importing repository into cicd/Chef/Templates/test-myproject - comparison of String with 0 failed","caller":"/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb:47:in rescue in execute'"}`
production.log
Error writing to .git/config for project cicd/Chef/Templates/test-myproject (3240): repository does not exist.
mail:
Project Cookbook_Template couldn't be exported. The errors we encountered were: • Error importing repository into [FILTERED] - comparison of String with 0 failed
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: 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.5 Go Version: unknown
GitLab information Version: 11.9.1-ee Revision: b50dc44 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.11 URL: *** HTTP Clone URL: *** SSH Clone URL: *** Elasticsearch: yes Geo: yes Geo node: Primary Using LDAP: yes Using Omniauth: yes Omniauth Providers:
GitLab Shell Version: 8.7.1 Repository storage paths:
- default: /data/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell 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.7.1 ? ... OK (8.7.1) 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
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: ... Server: ldapmain LDAP authentication... Success ...
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: ... ... (for all projects: yes) 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: ... 966 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 ... Exception: Timeout::Error Git user has default SSH configuration? ... yes OpenSSH configured to use AuthorizedKeysCommand ... skipped Reason: Cannot access OpenSSH configuration file Try fixing it: This is expected if you are using SELinux. You may want to check configuration manually For more information see: doc/administration/operations/fast_ssh_key_lookup.md GitLab configured to disable writing to authorized_keys file ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes
Checking Geo ... Finished
Checking GitLab subtasks ... Finished