Problem using LFS via SSH

Summary

using ssh to push, git lfs in current release seems to not work at all.

Steps to reproduce

  • set gitlab_rails['lfs_enabled'] = true
  • reconfigure and restart gitlab omnibus
  • create project in gitlab
  • install git lfs client and init repo as described here https://git-lfs.github.com/
  • create new git repo locally git init
  • track files git lfs track "*.psd"
  • add SSH origin to git repo copied from gitlab git remote add origin git@host:group/project.git
  • do a commit
  • push to origin

you will get the following:

Git LFS: (0 of 1 files) 0 B / 55.75 MB
exit status 1
exit status 1
error: failed to push some refs to 'git@host:group/project.git'

So i searched in the docs and started over with:

git config --add lfs.url "https://host/group/project.git/info/lfs/objects/batch"

But this gave me:

Username for 'https://host': kaystrobach
Password for 'https://user@host':
Username for 'https://host': user
Password for 'https://user@host':
Username for 'https://host': user
Password for 'https://user@host':
Git LFS: (0 of 1 files) 0 B / 55.75 MB
Repository or object not found: https://host/group/project.git/info/lfs/objects/batch/objects
Check that it exists and that you have proper access to it
Repository or object not found: https://host/group/project/info/lfs/objects/batch/objects
Check that it exists and that you have proper access to it
error: failed to push some refs to 'git@host:group/project.git'

Expected behavior

  • successfull push via SSH

Relevant logs and/or screenshots

  • see above

Output of checks

Results of GitLab Application Check

Checking GitLab Shell ...

GitLab Shell version >= 2.6.10 ? ... OK (2.6.10)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
hooks directories in repos are links: ...
4/1 ... repository is empty
4/2 ... repository is empty
4/3 ... repository is empty
4/5 ... ok
4/6 ... repository is empty
4/7 ... repository is empty
11/8 ... ok
12/9 ... repository is empty
8/11 ... repository is empty
11/14 ... repository is empty
3/15 ... ok
3/17 ... repository is empty
22/18 ... ok
7/20 ... repository is empty
7/22 ... repository is empty
2/23 ... ok
3/25 ... ok
3/26 ... ok
3/27 ... ok
7/28 ... repository is empty
4/29 ... repository is empty
3/31 ... ok
7/33 ... ok
4/34 ... ok
2/35 ... ok
2/36 ... repository is empty
3/37 ... repository is empty
11/38 ... ok
3/39 ... ok
3/40 ... repository is empty
3/41 ... repository is empty
3/42 ... repository is empty
28/43 ... ok
28/44 ... ok
31/48 ... ok
31/49 ... ok
3/50 ... ok
5/52 ... ok
3/53 ... ok
7/54 ... ok
32/56 ... ok
4/58 ... ok
3/59 ... ok
3/61 ... ok
3/62 ... ok
10/64 ... repository is empty
3/65 ... ok
3/66 ... repository is empty
3/67 ... ok
3/68 ... ok
3/69 ... repository is empty
3/70 ... ok
3/71 ... ok
2/72 ... repository is empty
31/73 ... ok
4/74 ... repository is empty
2/75 ... ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Check directories and files:
	/var/opt/gitlab/git-data/repositories: OK
	/var/opt/gitlab/.ssh/authorized_keys: OK
Test redis-cli executable: redis-cli 2.8.21
Send ping to redis server: PONG
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 ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

Git configured with autocrlf=input? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... no
  Try fixing it:
  sudo chown -R git /var/opt/gitlab/gitlab-rails/uploads
  sudo find /var/opt/gitlab/gitlab-rails/uploads -type f -exec chmod 0644 {} \;
  sudo find /var/opt/gitlab/gitlab-rails/uploads -type d -not -path /var/opt/gitlab/gitlab-rails/uploads -exec chmod 0700 {} \;
  For more information see:
  doc/install/installation.md in section "GitLab"
  Please fix the error above and rerun the checks.
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/5 ... yes
4/6 ... yes
4/7 ... yes
11/8 ... yes
12/9 ... yes
8/11 ... yes
11/14 ... yes
3/15 ... yes
3/17 ... yes
22/18 ... yes
7/20 ... yes
7/22 ... yes
2/23 ... yes
3/25 ... yes
3/26 ... yes
3/27 ... yes
7/28 ... yes
4/29 ... yes
3/31 ... yes
7/33 ... yes
4/34 ... yes
2/35 ... yes
2/36 ... yes
3/37 ... yes
11/38 ... yes
3/39 ... yes
3/40 ... yes
3/41 ... yes
3/42 ... yes
28/43 ... yes
28/44 ... yes
31/48 ... yes
31/49 ... yes
3/50 ... yes
5/52 ... yes
3/53 ... yes
7/54 ... yes
32/56 ... yes
4/58 ... yes
3/59 ... yes
3/61 ... yes
3/62 ... yes
10/64 ... yes
3/65 ... yes
3/66 ... yes
3/67 ... yes
3/68 ... yes
3/69 ... yes
3/70 ... yes
3/71 ... yes
2/72 ... yes
31/73 ... yes
4/74 ... yes
2/75 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.1.8)
Your git bin path is "/opt/gitlab/embedded/bin/git"
Git version >= 1.7.10 ? ... yes (2.6.2)
Active users: 39

Checking GitLab ... Finished

Results of GitLab Environment Info

System information
System:
Current User:	git
Using RVM:	no
Ruby Version:	2.1.8p440
Gem Version:	2.5.1
Bundler Version:1.10.6
Rake Version:	10.5.0
Sidekiq Version:4.0.1

GitLab information
Version:	8.5.5
Revision:	11f388a
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	postgresql
URL:		<hostname>
HTTP Clone URL:	https://<hostname>/some-group/some-project.git
SSH Clone URL:	git@<hostname>:some-group/some-project.git
Using LDAP:	no
Using Omniauth:	yes
Omniauth Providers: github

GitLab Shell
Version:	2.6.10
Repositories:	/var/opt/gitlab/git-data/repositories
Hooks:		/opt/gitlab/embedded/service/gitlab-shell/hooks/
Git:		/opt/gitlab/embedded/bin/git

Possible fixes

Currently pushing with lfs objects works, if you push via HTTPS, there seems to be no way to push via SSH anymore.

Edited by 🤖 GitLab Bot 🤖