Importing from github enterprise fails with parse error

Summary

We are in the process of migrating from github enterprise to gitlab. All projects we try to import into gitlab are marked as failed, but it looks to me as if the import was a success.

Steps to reproduce

Since we are importing from a private github enterprise, I am not able to provide steps to reproduce this bug.

What is the current bug behavior?

The import is marked as failed

What is the expected correct behavior?

The import is marked as success

Relevant logs and/or screenshots

2017-08-30_14:59:55.69946 2017-08-30T14:59:55.699Z 31304 TID-otztng5yk WARN: RepositoryImportWorker::ImportError: Error importing repository https://xxx@git.xxx.de/mercurial-grave/test.git into mercurial-grave/test - unexpected character at line 1, column 1 [parse.c:664]
2017-08-30_14:59:55.69951 2017-08-30T14:59:55.699Z 31304 TID-otztng5yk WARN: /opt/gitlab/embedded/service/gitlab-rails/app/workers/repository_import_worker.rb:24:in `perform'```

### Output of checks


#### Results of GitLab environment info

<details>
<summary>Expand for output related to GitLab environment info</summary>
<pre>

System information
System:		Ubuntu 16.04
Current User:	git
Using RVM:	no
Ruby Version:	2.3.3p222
Gem Version:	2.6.6
Bundler Version:1.13.7
Rake Version:	12.0.0
Redis Version:	3.2.5
Git Version:	2.13.5
Sidekiq Version:5.0.4
Go Version:	unknown

GitLab information
Version:	9.5.1
Revision:	c47ae37
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	postgresql
URL:		https://gitlab.xxx.de
HTTP Clone URL:	https://gitlab.xxx.de/some-group/some-project.git
SSH Clone URL:	git@gitlab.xxx.de:some-group/some-project.git
Using LDAP:	yes
Using Omniauth:	yes
Omniauth Providers: saml, github

GitLab Shell
Version:	5.8.0
Repository storage paths:
- default: 	/var/opt/gitlab/git-data/repositories
Hooks:		/opt/gitlab/embedded/service/gitlab-shell/hooks
Git:		/opt/gitlab/embedded/bin/git

</pre>
</details>

#### Results of GitLab application Check

<details>
<summary>Expand for output related to the GitLab application check</summary>
<pre>

Checking GitLab Shell ...

GitLab Shell version >= 5.8.0 ? ... OK (5.8.0)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:root, or git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ...
4/1 ... ok
4/2 ... ok
4/3 ... ok
4/4 ... ok
4/5 ... ok
4/6 ... ok
4/7 ... ok
4/8 ... ok
4/9 ... ok
4/10 ... ok
4/11 ... ok
4/12 ... ok
2/13 ... ok
2/14 ... ok
2/15 ... ok
5/16 ... ok
6/17 ... ok
6/18 ... ok
6/19 ... ok
6/20 ... ok
43/131 ... ok
19/132 ... ok
35/143 ... ok
35/144 ... ok
35/145 ... ok
35/146 ... ok
35/147 ... ok
35/148 ... ok
35/149 ... ok
35/150 ... ok
35/151 ... ok
35/152 ... ok
57/153 ... ok
57/154 ... ok
57/155 ... ok
57/156 ... ok
57/157 ... ok
57/158 ... ok
57/159 ... ok
57/160 ... ok
57/161 ... ok
57/162 ... ok
57/163 ... ok
57/164 ... ok
57/165 ... ok
57/166 ... ok
57/167 ... ok
57/168 ... ok
57/169 ... ok
57/170 ... ok
57/171 ... ok
57/172 ... ok
57/173 ... ok
57/174 ... ok
57/175 ... ok
57/176 ... ok
57/177 ... ok
57/178 ... ok
57/179 ... ok
57/180 ... ok
57/181 ... ok
57/182 ... ok
57/183 ... repository is empty
57/184 ... ok
57/185 ... ok
57/186 ... ok
57/187 ... ok
57/188 ... repository is empty
57/189 ... ok
57/190 ... ok
57/191 ... ok
57/192 ... ok
57/193 ... ok
57/194 ... ok
57/195 ... ok
57/196 ... ok
57/197 ... ok
57/198 ... repository is empty
57/199 ... ok
57/200 ... repository is empty
57/201 ... ok
57/202 ... ok
57/203 ... ok
57/204 ... ok
57/205 ... repository is empty
57/206 ... ok
57/207 ... ok
57/208 ... ok
54/209 ... ok
57/210 ... ok
51/211 ... ok
51/213 ... ok
51/214 ... ok
60/215 ... ok
41/218 ... ok
39/219 ... ok
41/220 ... ok
41/221 ... ok
39/222 ... ok
41/223 ... ok
29/224 ... ok
58/225 ... ok
58/226 ... ok
58/227 ... ok
58/228 ... ok
58/229 ... ok
58/230 ... ok
58/231 ... ok
58/232 ... ok
58/233 ... ok
41/234 ... ok
58/235 ... ok
58/236 ... ok
58/237 ... ok
61/238 ... ok
58/239 ... ok
71/240 ... ok
6/277 ... ok
22/279 ... ok
82/280 ... ok
82/281 ... ok
22/282 ... ok
22/283 ... ok
83/284 ... ok
83/285 ... ok
84/286 ... ok
84/287 ... ok
29/290 ... ok
9/291 ... ok
76/292 ... ok
76/293 ... ok
22/294 ... ok
22/295 ... ok
22/296 ... ok
13/297 ... ok
13/298 ... ok
95/299 ... ok
99/300 ... ok
22/301 ... ok
22/302 ... ok
22/303 ... ok
22/304 ... ok
22/305 ... ok
22/306 ... ok
22/307 ... ok
22/308 ... ok
22/309 ... ok
22/310 ... ok
22/311 ... ok
22/312 ... ok
22/313 ... ok
22/314 ... ok
22/315 ... ok
22/316 ... ok
22/317 ... ok
22/318 ... ok
22/319 ... ok
22/320 ... ok
22/321 ... ok
22/322 ... ok
22/323 ... ok
22/324 ... ok
22/325 ... ok
22/326 ... ok
22/327 ... ok
22/328 ... ok
22/329 ... ok
22/330 ... ok
22/331 ... ok
22/332 ... ok
22/333 ... ok
22/334 ... ok
22/335 ... ok
22/336 ... ok
22/337 ... ok
22/338 ... ok
22/339 ... ok
22/340 ... ok
22/341 ... ok
22/342 ... ok
22/343 ... ok
22/344 ... ok
22/345 ... ok
22/346 ... ok
22/347 ... ok
100/349 ... ok
22/350 ... ok
22/351 ... ok
22/352 ... ok
22/354 ... ok
22/355 ... ok
22/356 ... ok
22/358 ... ok
22/359 ... ok
22/360 ... ok
22/361 ... ok
22/362 ... ok
22/363 ... ok
22/364 ... ok
22/365 ... ok
22/366 ... ok
22/367 ... ok
31/369 ... repository is empty
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

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

Checking Sidekiq ... Finished

Checking Reply by email ...

Reply by email is disabled in config/gitlab.yml

Checking Reply by email ... Finished

Checking LDAP ...

Server: ldapmain
not verifying SSL hostname of LDAPS server 'xxx'
LDAP authentication... Success
LDAP users with access to your GitLab server (only showing the first 100 results)
xxx

Checking LDAP ... Finished

Checking GitLab ...

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: ...
4/1 ... yes
4/2 ... yes
4/3 ... yes
4/4 ... yes
4/5 ... yes
4/6 ... yes
4/7 ... yes
4/8 ... yes
4/9 ... yes
4/10 ... yes
4/11 ... yes
4/12 ... yes
2/13 ... yes
2/14 ... yes
2/15 ... yes
5/16 ... yes
6/17 ... yes
6/18 ... yes
6/19 ... yes
6/20 ... yes
43/131 ... yes
19/132 ... yes
35/143 ... yes
35/144 ... yes
35/145 ... yes
35/146 ... yes
35/147 ... yes
35/148 ... yes
35/149 ... yes
35/150 ... yes
35/151 ... yes
35/152 ... yes
57/153 ... yes
57/154 ... yes
57/155 ... yes
57/156 ... yes
57/157 ... yes
57/158 ... yes
57/159 ... yes
57/160 ... yes
57/161 ... yes
57/162 ... yes
57/163 ... yes
57/164 ... yes
57/165 ... yes
57/166 ... yes
57/167 ... yes
57/168 ... yes
57/169 ... yes
57/170 ... yes
57/171 ... yes
57/172 ... yes
57/173 ... yes
57/174 ... yes
57/175 ... yes
57/176 ... yes
57/177 ... yes
57/178 ... yes
57/179 ... yes
57/180 ... yes
57/181 ... yes
57/182 ... yes
57/183 ... yes
57/184 ... yes
57/185 ... yes
57/186 ... yes
57/187 ... yes
57/188 ... yes
57/189 ... yes
57/190 ... yes
57/191 ... yes
57/192 ... yes
57/193 ... yes
57/194 ... yes
57/195 ... yes
57/196 ... yes
57/197 ... yes
57/198 ... yes
57/199 ... yes
57/200 ... yes
57/201 ... yes
57/202 ... yes
57/203 ... yes
57/204 ... yes
57/205 ... yes
57/206 ... yes
57/207 ... yes
57/208 ... yes
54/209 ... yes
57/210 ... yes
51/211 ... yes
51/213 ... yes
51/214 ... yes
60/215 ... yes
41/218 ... yes
39/219 ... yes
41/220 ... yes
41/221 ... yes
39/222 ... yes
41/223 ... yes
29/224 ... yes
58/225 ... yes
58/226 ... yes
58/227 ... yes
58/228 ... yes
58/229 ... yes
58/230 ... yes
58/231 ... yes
58/232 ... yes
58/233 ... yes
41/234 ... yes
58/235 ... yes
58/236 ... yes
58/237 ... yes
61/238 ... yes
58/239 ... yes
71/240 ... yes
6/277 ... yes
22/279 ... yes
82/280 ... yes
82/281 ... yes
22/282 ... yes
22/283 ... yes
83/284 ... yes
83/285 ... yes
84/286 ... yes
84/287 ... yes
29/290 ... yes
9/291 ... yes
76/292 ... yes
76/293 ... yes
22/294 ... yes
22/295 ... yes
22/296 ... yes
13/297 ... yes
13/298 ... yes
95/299 ... yes
99/300 ... yes
22/301 ... yes
22/302 ... yes
22/303 ... yes
22/304 ... yes
22/305 ... yes
22/306 ... yes
22/307 ... yes
22/308 ... yes
22/309 ... yes
22/310 ... yes
22/311 ... yes
22/312 ... yes
22/313 ... yes
22/314 ... yes
22/315 ... yes
22/316 ... yes
22/317 ... yes
22/318 ... yes
22/319 ... yes
22/320 ... yes
22/321 ... yes
22/322 ... yes
22/323 ... yes
22/324 ... yes
22/325 ... yes
22/326 ... yes
22/327 ... yes
22/328 ... yes
22/329 ... yes
22/330 ... yes
22/331 ... yes
22/332 ... yes
22/333 ... yes
22/334 ... yes
22/335 ... yes
22/336 ... yes
22/337 ... yes
22/338 ... yes
22/339 ... yes
22/340 ... yes
22/341 ... yes
22/342 ... yes
22/343 ... yes
22/344 ... yes
22/345 ... yes
22/346 ... yes
22/347 ... yes
100/349 ... yes
22/350 ... yes
22/351 ... yes
22/352 ... yes
22/354 ... yes
22/355 ... yes
22/356 ... yes
22/358 ... yes
22/359 ... yes
22/360 ... yes
22/361 ... yes
22/362 ... yes
22/363 ... yes
22/364 ... yes
22/365 ... yes
22/366 ... yes
22/367 ... yes
31/369 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.3.3 ? ... yes (2.3.3)
Git version >= 2.7.3 ? ... yes (2.13.5)
Active users: ... 61

Checking GitLab ... Finished
</pre>
</details>

### Possible fixes

(If you can, link to the line of code that might be responsible for the problem)
Assignee Loading
Time tracking Loading