bugs/no git-annex shell on Windowsgit-annexhttp://git-annex.branchable.com/bugs/no_git-annex_shell_on_Windows/git-annexikiwiki2018-02-08T17:16:32Zcomment 1http://git-annex.branchable.com/bugs/no_git-annex_shell_on_Windows/comment_1_988768c3e4f30c751034a0b0390cdd88/joeyh.name2014-05-16T18:12:34Z2014-05-16T18:12:34Z
You should be able to copy git-annex.exe to git-annex-shell.exe and that will be usable as git-annex-shell. I could make the windows installer do this, but without the ability to easily hard or symlink the files, it would double the disk space for what seems an unusual use case..
comment 2http://git-annex.branchable.com/bugs/no_git-annex_shell_on_Windows/comment_2_70a6c9af57eed4f8ceb3de63cbf8a5e6/Michael2014-05-16T18:58:13Z2014-05-16T18:58:13Z
<p>Hmm, I don't understand the double disk space issue.
If direct mode is used, files are stored once, right?</p>
comment 3http://git-annex.branchable.com/bugs/no_git-annex_shell_on_Windows/comment_3_7f48959c6242c5cc52e9d0a79fd3f85d/joeyh.name2014-05-16T20:36:02Z2014-05-16T20:36:02Z
I mean that copying git-annex.exe to git-annex-shell.exe doubles the disk space needed to install git-annex.
comment 4http://git-annex.branchable.com/bugs/no_git-annex_shell_on_Windows/comment_4_04b30dd9e510762ee547e7b45bdba660/Michael2014-05-24T21:26:24Z2014-05-24T21:26:24Z
<p>I tried copying git-annex.exe to git-annex-shell.exe, but it doesn't behave as git-annex-shell:</p>
<p>git-annex-shell -c configlist
git-annex-shell.exe: unknown command configlist</p>
comment 5http://git-annex.branchable.com/bugs/no_git-annex_shell_on_Windows/comment_5_beebbd4a41cccfc7aac3c19d76c3b978/Michael2014-05-24T21:45:55Z2014-05-24T21:45:55Z
Looks like .exe prefix confuses detection logic. If I remove extension, it does behave as git-annex-shell.
comment 6http://git-annex.branchable.com/bugs/no_git-annex_shell_on_Windows/comment_6_957c5da5f336c7ef59e4149602471888/Michael2014-05-24T21:49:47Z2014-05-24T21:49:47Z
<p>However, it's still not usable remotely over ssh:</p>
<p>git annex sync kpf</p>
<p>git-annex-shell: git: createProcess: invalid argument (Invalid argument)</p>
<p> Remote kpf does not have git-annex installed; setting annex-ignore</p>
comment 7http://git-annex.branchable.com/bugs/no_git-annex_shell_on_Windows/comment_7_a8654cf656de55ccdcf40270a1ef4ca9/Michael2014-05-24T22:07:15Z2014-05-24T22:07:15Z
<p>OK thought I'd use it with annex-ignore set, but:</p>
<pre><code>git annex copy --to=kpf file.jpg
copy file.jpg (checking kpf...) git-annex-shell: git: createProcess: invalid argument (Invalid argument)
</code></pre>
<p>(to kpf...)
git-annex-shell: git: createProcess: invalid argument (Invalid argument)
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.0]</p>
<pre><code>rsync failed -- run git annex again to resume file transfer
failed
</code></pre>
<p>git-annex: copy: 1 failed</p>
<p>For reference, here's the .git/config section.</p>
<p>I can either set receivepack/uploadpack like below or add /cygdrive/c/Program Files (x86)/Git/libexec/git-core to PATH in cygwin shell.</p>
<p>Also, if I set url to kp:/cygdrive/f/backup/f, git complains that it's not a git repository (msysgit doesn't understand cygwin stuff?)</p>
<pre><code>[remote "kpf"]
url = kp:f:/backup/ph
fetch = +refs/heads/*:refs/remotes/kpf/*
receivepack = git receive-pack
uploadpack = git upload-pack
annex-uuid = 99c498fc-e38e-11e3-8bb0-5368a291bd90
annex-ignore = true
</code></pre>
comment 8http://git-annex.branchable.com/bugs/no_git-annex_shell_on_Windows/comment_8_3c8bb1b1d67ca1a6e568e381d24a2574/Michael2014-05-24T22:58:16Z2014-05-24T22:58:16Z
<p>Another data point. If I install cygwin's git (so references like kp:/cygdrive/f would be understood) and remove annex-ignore setting, I get:</p>
<pre><code>git annex sync kpf
commit ok
pull kpf
git-annex: Unknown command 'kp'
</code></pre>
<p>Looks like hostname (kp) is taken as a command somehow.</p>
comment 9http://git-annex.branchable.com/bugs/no_git-annex_shell_on_Windows/comment_9_03646c9df9d4f4ea27459660fe65a976/Phil2014-07-05T22:29:01Z2014-07-05T22:29:01Z
<p>Copying the <code>git-annex.exe</code> does work but you can also create a symlink and tell Windows to execute symlinks by doing the following.</p>
<p>On the remote machine (the one you are connecting to)</p>
<h2>Create a symlink:</h2>
<pre><code>mklink "C:\Program Files (x86)\Git\bin\git-annex-shell" "C:\Program Files (x86)\Git\bin\git-annex.exe"
</code></pre>
<h2>Tell Windows to run files with no extension:</h2>
<ul>
<li>Open Environment Variables</li>
<li>At the end of <code>PATHEXT</code> add <code>;.</code></li>
</ul>
<h2>A problem with rsync</h2>
<p>Unfortunately I now get <code>Access is denied</code> and <code>rsync: connection unexpectedly closed</code>. I think this is due to path issues on Windows. Trying rsync manually I need to use the <code>/cygdrive/c/rest/of/path</code> syntax otherwise I get <code>No such file or directory.</code></p>
Did' nyone make it work?http://git-annex.branchable.com/bugs/no_git-annex_shell_on_Windows/comment_10_72b2277c3728f02e4d158ebbd7db41b2/timotejs2018-02-06T08:15:06Z2018-02-06T08:15:06Z
<p>I try to use SSH to connect to Win10 machine with annex repo.
I am using the OpenSSH integrated into the Windows 10 (one you can install from Windows additional features thingy).</p>
<p>it didn't know git-annex-shell so i created symlink</p>
<pre><code>mklink "C:\Program Files (x86)\Git\bin\git-annex-shell" "C:\Program Files (x86)\Git\bin\git-annex.exe"
</code></pre>
<p>and added ';.' to PATHEX</p>
<p>Currently git-annex-shell is found but i get error:</p>
<pre><code>Invalid argument `'configlist''
</code></pre>
<p>when i try to sync remote on that W10 machine</p>
comment 11http://git-annex.branchable.com/bugs/no_git-annex_shell_on_Windows/comment_11_b212c8b8cf361745f35a9f7ff6fee1f5/joey2018-02-06T17:06:54Z2018-02-06T17:04:51Z
<p>If you copy git-annex.exe to git-annex-shell.exe, it should work.</p>
<p>The installer doesn't do it, because doubling the installation size footprint
for a feature that involves sshing into a Windows machine (not very common
I suspect) didn't seem worth it.</p>
comment 12http://git-annex.branchable.com/bugs/no_git-annex_shell_on_Windows/comment_12_9d445ddf84e15a59cdc2aa2b8dc30c44/joey2018-02-08T17:16:32Z2018-02-08T17:13:41Z
<p>That error message seems to indicate that git-annex does not realize it's
being run with the git-annex-shell program name. When I run "git-annex -c
configlist /path/to/repo" I get that error message; when I run
git-annex-shell with the same parameters, I get the expected repository
config output.</p>
<p>I'm guessing that the windows symlink thing you tried to use confuses the
program path name lookup that it tries to do. I'm pretty sure that a copy
of the file would work.</p>