git version: 1.9.5.msysgit.1 git-annex version: 5.20150710-g8fd7052
I have a repo up on GitLab. I have annex’d files in that repo. On a Linux server I can “git annex sync” and then “git annex get” just fine. On Windows when I try to run “git annex sync” I get:
GitLab: You don't have access
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-a nnex-shell is available in PATH when you ssh into the remote. Once you have fixed the git-annex inst allation, run: git config remote.origin.annex-ignore false commit ok pull origin git-annex.exe: unknown command git@gitlab.server.com … fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists. failed git-annex: sync: 1 failed
I have access to the repo however. I can git pull/push…whatever. It’s just annex that is having problems with access and I’m not sure why. Here is my git config:
[core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true symlinks = false ignorecase = true hideDotFiles = dotGitOnly [remote "origin"] url = git@gitlab.company.com:repo.git fetch = +refs/heads/:refs/remotes/origin/ annex-ignore = false [annex] uuid = 2noa1e70-9f88-4did-843c-3f8sdf3495990 sshcaching = false crippledfilesystem = true version = 5
The "GitLab: You don't have access" seems to be gitlab refusing to run git-annex-shell when asked to. Only the gitlab people could help you with that. (Gitlab does seem to work with git-annex today when I try it, I had some similar problems with their implementation refusing to start git-annex-shell earlier.)
OTOH, the "git-annex.exe: unknown command git@gitlab.server.com" looks like you ran into this bug: http://git-annex.branchable.com/bugs/git-annex_sync_under_windows_fails_by_using_itself_as_the_ssh_command/ Since I have still not managed to reproduce or get to the bottom of that bug report, any information about it would be useful.
Pretty sure that the only difference gitlab can see between your Windows and Linux boxes there is the ssh key that they're using. So, maybe you need to add the Windows box's ssh key to the gitlab repo, or there's a problem in that area.
The bug you linked does look like the same thing I'm seeing. I decided to install cygwin on the same server to see if it made a difference. It started adding files this time and I thought I had a solution, but then it threw the same error about access.
$ git annex sync --verbose
Detected a filesystem without fifo support.
Disabling ssh connection caching.
Detected a crippled filesystem. (merging origin/git-annex into git-annex...) (recording state in git...)
Enabling direct mode. commit (recording state in git...) add Bin/FastMM_FullDebugMode.dll ok add Bin/Res/bar_blank.gif ok add Bin/Res/bar_blank_gray.gif ok add Bin/Res/bar_gray.gif ok add Bin/Res/bar_left.gif ok add Bin/Res/bar_middle.gif ok add Bin/Res/bar_right.gif ok add Bin/Res/btn_back_0.gif ok add Bin/Res/btn_back_1.gif ok add Bin/Res/btn_back_2.gif ok add Bin/Res/btn_back_3.gif ok ... (recording state in git...) ok pull origin git-annex.exe: unknown command git@gitlab.company.com
Usage: git-annex command [option ...] ... fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Pushing to origin failed.
(non-fast-forward problems can be solved by setting receive.denyNonFastforwards to false in the remote's git config) failed (recording state in git...)
git-annex.exe: sync: 2 failed
So it seemed to get a little further, but still fails. The key $HOME/.ssh/id_rsa has full access to the repo and I'm able to push/pull with git just fine. Not sure what else to try for annex sync.
Also, I created git-annex-shell.exe as a copy of git-annex.exe which you recommended here: https://git-annex.branchable.com/bugs/no_git-annex_shell_on_Windows/.
I also made sure UAC and Windows Firewall were disabled and they already were.
What environment variables should exist to support annex? I see references to GIT_ANNEX_SSHOPTION and GIT_SSH, but those aren't currently configured on my Windows server. The git, git-annex and git-annex-shell files are in the global path and accessible from anywhere.