From 4b0af2f27b61fee14d4d1594d0a4954892cd759c Mon Sep 17 00:00:00 2001 From: jwodder Date: Thu, 9 Dec 2021 14:13:54 +0000 Subject: [PATCH 1/4] --- ...ld_failing_on_Windows_since_ef3ab0769.mdwn | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 doc/bugs/Build_failing_on_Windows_since_ef3ab0769.mdwn diff --git a/doc/bugs/Build_failing_on_Windows_since_ef3ab0769.mdwn b/doc/bugs/Build_failing_on_Windows_since_ef3ab0769.mdwn new file mode 100644 index 0000000000..842869ccec --- /dev/null +++ b/doc/bugs/Build_failing_on_Windows_since_ef3ab0769.mdwn @@ -0,0 +1,74 @@ +Due to the type change of `tryMakeLockHandle` in commit ef3ab0769, compilation of git-annex is currently failing on Windows with the below error. I am unsure of the best way to fix it. + +[[!format txt """ +Utility\LockPool\Windows.hs:25:19: error: + * Couldn't match type `(LockHandle, t1)' with `LockHandle' + Expected type: IO (Maybe LockHandle) + Actual type: IO (Maybe (LockHandle, t1)) + * In the expression: + tryMakeLockHandle + P.lockPool file (\ p f -> P.tryTakeLock p f LockShared) + (\ f _ -> fmap mk <$> F.lockShared f) + In an equation for `lockShared': + lockShared file + = tryMakeLockHandle + P.lockPool file (\ p f -> P.tryTakeLock p f LockShared) + (\ f _ -> fmap mk <$> F.lockShared f) + | +25 | lockShared file = tryMakeLockHandle P.lockPool file + + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... + +Utility\LockPool\Windows.hs:27:18: error: + * Couldn't match type `FileLockOps' with `(FileLockOps, t1)' + Expected type: IO (Maybe (FileLockOps, t1)) + Actual type: IO (Maybe FileLockOps) + * In the expression: fmap mk <$> F.lockShared f + In the fourth argument of `tryMakeLockHandle', namely + `(\ f _ -> fmap mk <$> F.lockShared f)' + In the expression: + tryMakeLockHandle + P.lockPool file (\ p f -> P.tryTakeLock p f LockShared) + (\ f _ -> fmap mk <$> F.lockShared f) + | +27 | (\f _ -> fmap mk <$> F.lockShared f) + + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Utility\LockPool\Windows.hs:36:22: error: + * Couldn't match type `(LockHandle, t0)' with `LockHandle' + Expected type: IO (Maybe LockHandle) + Actual type: IO (Maybe (LockHandle, t0)) + * In the expression: + tryMakeLockHandle + P.lockPool file (\ p f -> P.tryTakeLock p f LockExclusive) + (\ f _ -> fmap mk <$> F.lockExclusive f) + In an equation for `lockExclusive': + lockExclusive file + = tryMakeLockHandle + P.lockPool file (\ p f -> P.tryTakeLock p f LockExclusive) + (\ f _ -> fmap mk <$> F.lockExclusive f) + | +36 | lockExclusive file = tryMakeLockHandle P.lockPool file + + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... + +Utility\LockPool\Windows.hs:38:18: error: + * Couldn't match type `FileLockOps' with `(FileLockOps, t0)' + Expected type: IO (Maybe (FileLockOps, t0)) + Actual type: IO (Maybe FileLockOps) + * In the expression: fmap mk <$> F.lockExclusive f + In the fourth argument of `tryMakeLockHandle', namely + `(\ f _ -> fmap mk <$> F.lockExclusive f)' + In the expression: + tryMakeLockHandle + P.lockPool file (\ p f -> P.tryTakeLock p f LockExclusive) + (\ f _ -> fmap mk <$> F.lockExclusive f) + | +38 | (\f _ -> fmap mk <$> F.lockExclusive f) + + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +"""]] + +[[!meta author=jwodder]] +[[!tag projects/datalad]] From f1516579ce0a9ba539b3bcfe15094260f5984ac5 Mon Sep 17 00:00:00 2001 From: "jasonb@ab4484d9961a46440958fa1a528e0fc435599057" Date: Thu, 9 Dec 2021 16:20:48 +0000 Subject: [PATCH 2/4] Added a comment --- ..._edbc4191d6444dfe50f4c1d7bbab572d._comment | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 doc/forum/So_this_is_embarrassing__59___git_export_not_working/comment_5_edbc4191d6444dfe50f4c1d7bbab572d._comment diff --git a/doc/forum/So_this_is_embarrassing__59___git_export_not_working/comment_5_edbc4191d6444dfe50f4c1d7bbab572d._comment b/doc/forum/So_this_is_embarrassing__59___git_export_not_working/comment_5_edbc4191d6444dfe50f4c1d7bbab572d._comment new file mode 100644 index 0000000000..1eede925a1 --- /dev/null +++ b/doc/forum/So_this_is_embarrassing__59___git_export_not_working/comment_5_edbc4191d6444dfe50f4c1d7bbab572d._comment @@ -0,0 +1,29 @@ +[[!comment format=mdwn + username="jasonb@ab4484d9961a46440958fa1a528e0fc435599057" + nickname="jasonb" + avatar="http://cdn.libravatar.org/avatar/c7330f4da122c671b935fc1d58bb02b1" + subject="comment 5" + date="2021-12-09T16:20:48Z" + content=""" +Yes, once I saw those errors, I went back and did a `get annex copy --from ` and recovered them. But what happened after that it seems I can't provide evidence of is running `git annex export ...` did not export the recovered files. It puzzlingly showed output that it was copying the files. + +(The `git annex sync --no-content` was because I've gotten used to running that for other repos where not doing that will copy files into a repo where I intentionally need them dropped. In this case, the goal was just to make sure the git branches properly reflected any file adds, deletes, and renames.) + +But on the target device, there was no evidence that the files were there. I ran an `ls` and they weren't present. I can't fathom why. But further attempts to export the files were unsuccessful. It seems you can't re-export files that already were copied. But they were nonetheless absent. I suppose this sounds fantastical, and somehow it is probably user error. + +And this is the remote definition. + +``` +[remote \"film-depot\"] + annex-directory = /Volumes/WDCGREEN/films + annex-uuid = 59db1192-02ff-440a-86d4-xxxx + skipFetchAll = true + annex-ignore = false +``` + +In any case, I'd successfully done exports here in the past, and had the files appear at the destination. So I'm doing something wrong, somehow. + +Can I just \"reset\" the export remote and start over again fresh? + +Thanks. +"""]] From 918b28b6dc807c3037bcbadacbe735a06bed6fbd Mon Sep 17 00:00:00 2001 From: yarikoptic Date: Thu, 9 Dec 2021 16:30:44 +0000 Subject: [PATCH 3/4] Initial report details from Manish on Windows --- ...phrase_ask_for_the_2nd_ssh_invocation.mdwn | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 doc/bugs/get__58___no_passphrase_ask_for_the_2nd_ssh_invocation.mdwn diff --git a/doc/bugs/get__58___no_passphrase_ask_for_the_2nd_ssh_invocation.mdwn b/doc/bugs/get__58___no_passphrase_ask_for_the_2nd_ssh_invocation.mdwn new file mode 100644 index 0000000000..0d46544008 --- /dev/null +++ b/doc/bugs/get__58___no_passphrase_ask_for_the_2nd_ssh_invocation.mdwn @@ -0,0 +1,52 @@ +### Please describe the problem. + +On a user Windows machine, we get an odd issue of being unable to `annex get` a file from an ssh remote ([https://gin.g-node.org/yarikoptic/test-annex](https://gin.g-node.org/yarikoptic/test-annex)) while using an ssh key with a passphrase. The reason seems to be that 2nd invocation of `ssh` by git-annex does not result in the prompt for the passphrase. + +I failed to reproduce locally in Windows VM machine. In my case (probably different setup of ssh etc), I 1). get passphrase prompt via external gui window (not in the same terminal); 2). do get 2nd prompt as well. + +[Here you can get a full log](http://www.onerussian.com/tmp/test-annex-output-windows-ssh-passphrase-20211209.txt) where you can see passphrase prompt for initial clone, then within `get` once and not after 2nd ssh call + + +``` +$> grep -1 -e passphrase -e faile -e 'ssh ' test-annex-output-windows-ssh-passphrase-20211209.txt +Cloning into 'test-annex'... +Enter passphrase for key '/c/Users/mvdmlab/.ssh/id_rsa': +remote: Enumerating objects: 58, done. +-- + + Disabling ssh connection caching. +[2021-12-09 10:41:16.7006865] (Utility.Process) process [14232] call: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","annex.debug=true","config","annex.sshcaching","false"] +-- + + You have enabled concurrency, but git-annex is not able to use ssh connection caching. This may result in multiple ssh processes prompting for passwords at the same time. + + annex.sshcaching is not set to true +[2021-12-09 10:41:21.819308] (Utility.Process) process [9560] read: ssh ["git@gin.g-node.org","-n","-T","git-annex-shell 'configlist' '/yarikoptic/test-annex' '--debug'"] +Enter passphrase for key '/c/Users/mvdmlab/.ssh/id_rsa': +[2021-12-09 10:41:32.8083061] (Utility.Process) process [9560] done ExitSuccess +-- + + You have enabled concurrency, but git-annex is not able to use ssh connection caching. This may result in multiple ssh processes prompting for passwords at the same time. + + annex.sshcaching is not set to true +[2021-12-09 10:41:32.8443384] (Utility.Process) process [2248] chat: ssh ["git@gin.g-node.org","-T","git-annex-shell 'p2pstdio' '/yarikoptic/test-annex' '--debug' 'dfff8737-36e2-4a1c-8206-bca071a5294d' --uuid 2a0fa804-1bd6-4298-aa55-4dc2d250eeac"] +[2021-12-09 10:41:34.1335084] (Utility.Process) process [2248] done ExitFailure 255 + + Transfer failed + +-- + No other repository is known to contain the file. +failed +[2021-12-09 10:41:34.1405139] (Utility.Process) process [14104] done ExitSuccess +-- +[2021-12-09 10:41:34.1475217] (Utility.Process) process [500] done ExitSuccess +get: 1 failed + +``` + +### What version of git-annex are you using? On what operating system? + +Windows, 8.20211124-ga8ff96864 + +[[!meta author=yoh]] +[[!tag projects/dandi]] From 68e8ed5acb5bde101727969ecbcb45935dde817f Mon Sep 17 00:00:00 2001 From: yarikoptic Date: Thu, 9 Dec 2021 16:32:03 +0000 Subject: [PATCH 4/4] add more lines for more informative extract --- ...__58___no_passphrase_ask_for_the_2nd_ssh_invocation.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/bugs/get__58___no_passphrase_ask_for_the_2nd_ssh_invocation.mdwn b/doc/bugs/get__58___no_passphrase_ask_for_the_2nd_ssh_invocation.mdwn index 0d46544008..9120d0b3d1 100644 --- a/doc/bugs/get__58___no_passphrase_ask_for_the_2nd_ssh_invocation.mdwn +++ b/doc/bugs/get__58___no_passphrase_ask_for_the_2nd_ssh_invocation.mdwn @@ -12,6 +12,12 @@ $> grep -1 -e passphrase -e faile -e 'ssh ' test-annex-output-windows-ssh-passph Cloning into 'test-annex'... Enter passphrase for key '/c/Users/mvdmlab/.ssh/id_rsa': remote: Enumerating objects: 58, done. +-- +# manually added to grep output for more consistent extract +(NWB) PS D:\NWB\test_annex> cd .\test-annex\ + + +(NWB) PS D:\NWB\test_annex\test-annex> git annex --debug get annexed -- Disabling ssh connection caching.