If a GitLab install uses a non-standard SSH port users will need to use a clone URL of format ssh://git@gitlab.example.com:2222/group/project.git. In this case git-annex does not seem to work.
Observed behavior
Normal git operations work fine with the above URL format, but when attempting to interact with annex users receive: Remote origin does not have git-annex installed; setting annex-ignore.
Next steps
I can reproduce this in my testing. @marin should this URL format work? Is there anything blocking support for this or is it just a bug? Thanks for taking a look.
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related or that one is blocking others.
Learn more.
git-annex and GitLab should work with with ssh:// in the url.
git-annex does read git.url.port so it should just be able to use that, this line looks like the one. It uses rsync to sync the data but that also uses ssh options received in previously mentioned piece of code.
@marin Thanks for your input. Let's treat it as a bug, then. I can reproduce it on GitLab.com.
If you have time to investigate this it would be appreciated. Right now this customer is resorting to 'direct remote to the bare repositories'. I'm not sure how they've set that up.
@dblessing Ok I installed and was testing all of this via docker, etc only to realise somehow we haven't merged the fix in. See https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/45 there was a MR for updating GITLAB_SHELL_VERSION but looking at the history it's not on any 8.6.X tag. It has been merged on master though... /cc @rymai
@jameslopez Thanks for looking. @rymai Can we ship in a patch? This has been a problem for this customer for a long time and I'd hate to have to tell them to wait another month. Are there other changes in that shell version?
Still does not work for me (I'm the customer) in gitlab official docker 8.6.4-ee.0.
Steps to reproduce:
use a custom ssh port (2222)
create a project
clone it
git annex init
git annex add (any file)
git annex sync
> git annex sync /opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_shell.rb:141:in `exec': No such file or directory - git-annex-shell (Errno::ENOENT) from /opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_shell.rb:141:in `exec_cmd' from /opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_shell.rb:113:in `process_cmd' from /opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_shell.rb:34:in `exec' from /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell:24:in `<main>' Remote origin does not have git-annex installed; setting annex-ignore This could be a problem with the git-annex installation on the remote. Please make sure that git-annex-shell is available in PATH when you ssh into the remote. Once you have fixed the git-annex installation, run: git config remote.origin.annex-ignore falsecommit okpull origin okpush origin Everything up-to-dateok
@kforner I could not replicate the problem using the Docker image for 8.6.4-ee. I've done exactly what you described above and git annex sync succeeded for me.
If it's not too much of a hassle may I suggest you send us the following info so I can compare my setup and yours? You can send us this through the support system if you prefer. It would be extremely helpful!
On the client side, in the folder where you've done the git clone:
I, [2016-04-05T15:47:14.309036 #12790] INFO -- : Enable git-annex for repository: /karl/annex_test.git.I, [2016-04-05T15:47:14.495724 #12790] INFO -- : POST http://127.0.0.1:8080/api/v3/internal/allowed 0.18404I, [2016-04-05T15:47:14.495996 #12790] INFO -- : gitlab-shell: executing git-annex command <git-annex-shell configlist /var/opt/gitlab/git-data/repositories/karl/annex_test.git> for user with key key-1.I, [2016-04-05T15:47:16.469364 #12810] INFO -- : POST http://127.0.0.1:8080/api/v3/internal/allowed 1.70017I, [2016-04-05T15:47:16.469749 #12810] INFO -- : gitlab-shell: executing git command <git-upload-pack /var/opt/gitlab/git-data/repositories/karl/annex_test.git> for user with key key-1.I, [2016-04-05T15:47:16.702169 #12816] INFO -- : POST http://127.0.0.1:8080/api/v3/internal/allowed 0.04142I, [2016-04-05T15:47:16.702366 #12816] INFO -- : gitlab-shell: executing git command <git-upload-pack /var/opt/gitlab/git-data/repositories/karl/annex_test.git> for user with key key-1.I, [2016-04-05T15:47:18.700668 #12822] INFO -- : POST http://127.0.0.1:8080/api/v3/internal/allowed 1.81854I, [2016-04-05T15:47:18.700959 #12822] INFO -- : gitlab-shell: executing git command <git-receive-pack /var/opt/gitlab/git-data/repositories/karl/annex_test.git> for user with key key-1.I, [2016-04-05T15:47:18.907650 #12827] INFO -- : POST http://127.0.0.1:8080/api/v3/internal/allowed 0.04075I, [2016-04-05T15:47:18.907941 #12827] INFO -- : gitlab-shell: executing git command <git-receive-pack /var/opt/gitlab/git-data/repositories/karl/annex_test.git> for user with key key-1.
I just simply did apt-get install git-annex and that installed it. Default docker images do not come with git-annex installed so you have to do this manually... (and every time you download a new docker image)
Also, you may have to add another Port 2222 to /etc/ssh/sshd_config You can have both 22 and 2222:
Now, should I create a new issue to have git-annex pre-installed in the docker images ?
Not only the updates would be more straightforward, but you could control the version of git-annex.