CharlesChiuGit / Logseq-Git-Sync-101

This repo aims to help Logseq users to sync their data with Git and GitHub.
MIT License
1.06k stars 88 forks source link

ssh-add not found in a-Shell #33

Closed jasonish closed 1 year ago

jasonish commented 1 year ago

The ssh-add command is not found in a-Shell. Where does it come from in this documentation? Per the a-Shell repo, it doesn't exist either: https://github.com/holzschu/a-shell/issues/560

Thanks.

CharlesChiuGit commented 1 year ago

https://github.com/search?q=repo%3Aholzschu%2Fa-shell+ssh-add&type=code

CharlesChiuGit commented 1 year ago

try update your ios and a-shell

cmccambridge commented 1 year ago

@CharlesChiuGit - the query linked only finds the manpages for ssh-add - the issue that @jasonish linked to is describing that the binaries for ssh-add are indeed missing, confirmed by the a-shell author.

I hit this issue today as well on iOS 16.4.1 (a) and a-Shell 1.11.3. The ssh-add instructions don't work.

I've attempted to workaround this by using lg2's support for two custom git options like this:

cd ~/Documents/logseq
lg2 config user.identityFile ~/Documents/.ssh/id_ed25519
lg2 config user.password ""

This does allow me to successfully lg2 pull from the a-shell commandline, but I caution that I cannot sync LogSeq yet. Still working through that bug.

CharlesChiuGit commented 1 year ago

Hi @cmccambridge ! Thanks for reporting this and sorry for the late reply, my pc just got blown up due to an transformer accident.

I'm a bit confused. So the lg2 pull did pull the repo from github, but you didn't see the changes in logseq(ios)? Is this what you mean by "but I caution that I cannot sync LogSeq yet"? Can u elaborate a bit?

Also what other bugs do you encountered? Maybe I can help a bit. (Personally I use WorkingCopy to sync github repos on iOS.)

CharlesChiuGit commented 1 year ago

Close as there's no further response.

cmccambridge commented 1 year ago

Hey @CharlesChiuGit sorry for the delay in responding. Honestly the experience with a-Shell was so frustrating that I gave up and bought a working Copy license.

The instructions as written definitely do not work for current iOS devices and current versions of a-Shell. I would recommend that you download a-Shell and experiment for a better solution, otherwise delete the instructions and replace them with the process in this post: https://discuss.logseq.com/t/sync-logseq-between-ios-and-pc-with-git/10854

Here’s the full list of the bugs I was building when I was still trying to get a-Shell to work… as you can see, the current instructions do not work for current a-Shell

  1. a-Shell simply does not have ssh-agent as described in this bug. The man page exists but that’s it. So instructions (step 6) need to be updated to use the user.IdentityFile approach instead.
  2. lg2 add does not have the -A flag. Instead, instructions (step 7) need to use lg2 add .
  3. Cloning directly into local directory through a-Shell then trying to open it from LogSeq will result in incompatible file permissions. Instead, users must use the pickFolder command in a-Shell to use the iOS APIs to properly grant access to LogSeq’s own app folder, then clone into that. (Step 2 must include this)
  4. a-shell shortcuts run in either the full app (which requires switching active app to be a-shell!) or a mini “extension” version of the app that can run in the background. Extension is needed for starting on app open automation, otherwise logseq opens and immediately switches to a-Shell instead. but for the extension mode, all commands must be included in a single Shortcut action, not one command per action, otherwise the current working directory, etc. will be reset. (Need to update step 7)
  5. Biggest problem: The extension mode does not seem to have access to the other app folders from pickFolder. So instead, you need to do a shortcut that opens full a-Shell app, syncs repository, then opens LogSeq. Use only this shortcut to launch the app. Then run an automation on close that switches to a-Shell again, syncs, and returns to Home Screen. This is honestly a pretty unpleasant experience especially when flipping back and forth to take notes from another app… I did get this to work following the other guide I linked, but it was so bad that I set up the trial of Working Copy and then bought that license.
CharlesChiuGit commented 1 year ago

@cmccambridge ok, I now mark it as deprecated.

m3lab-zzl commented 11 months ago

@cmccambridge Thank you for your explanation, I suffer exactly the same things and have to give up a-shell (or mini), wasted a few hours just because did not see your post here before.

@CharlesChiuGit Add a link to this issue would make the "deprecated" tag comprehensible.

CharlesChiuGit commented 11 months ago

@cmccambridge Thank you for your explanation, I suffer exactly the same things and have to give up a-shell (or mini), wasted a few hours just because did not see your post here before.

@CharlesChiuGit Add a link to this issue would make the "deprecated" tag comprehensible.

done, please check.