Import project doesn't accept email as username

Assume there is an account on a Git server with

  • Username = doe
  • Email = doe@example.com

On the commandline you can clone a repo using username:password:

git clone https://doe:password@example.com/doe/repo

but also with email:password (if you encode @ into %40):

git clone https://doe%40example.com:password@example.com/doe/repo

In GitLab you can create a new project by importing an existing repo: New project > Import project > Repo by URL.
Supplying the username in the 'Username (optional)' field works fine.

When you supply the email address in the 'Username (optional)' fails.
The project is created, but the repository is not imported.

Application.log
The Lfs import process failed. 5:GetRepoPath: not a git repository '/var/opt/gitlab/git-data/repositories/@hashed/28/da/28dae7c8bde2f3ca608f86d0e16a214dee74c74bee011cdfdd46bc04b655bc14.git'
Background job
Queue = repository_import
Job = RepositoryImportWorker
Arguments = 115
Error = RuntimeError: Error importing repository https://*****:*****@example.com/doe/repo into root/repo - 13:CreateRepositoryFromURL: clone cmd wait: exit status 128

Tested on

  • gitlab.com 12.3.0-pre 2290c310
  • Selfhosted GitLab 12.1.3-ee
Edited Sep 11, 2019 by Rene Verschoor
Assignee Loading
Time tracking Loading