Merge branch 'master' of ssh://git-annex.branchable.com

This commit is contained in:
Joey Hess 2019-10-10 16:18:46 -04:00
commit cb08cb0052
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
7 changed files with 179 additions and 0 deletions

View file

@ -0,0 +1,117 @@
### Please describe the problem.
I was trying to follow https://git-annex.branchable.com/special_remotes/git-lfs/ (only without any encryption), to store at least some data on github via LFS (e.g., for https://github.com/dandi-datasets/nwb_test_data).
Even though I do provide URL to the `annex initremote` call, it is not stored within `remote.log`:
[[!format sh """
$> sudo rm -rf /tmp/testds2 && ( mkdir /tmp/testds2 && cd /tmp/testds2 && git init && git annex init && git annex initremote gh-lfs autoenable=true type=git-lfs url=git@github.com:yarikoptic/testds2.git encryption=none && git show git-annex:remote.log; )
Initialized empty Git repository in /tmp/testds2/.git/
init (scanning for unlocked files...)
ok
(recording state in git...)
initremote gh-lfs ok
(recording state in git...)
c9132e68-e9d8-40b5-ba34-5d60a8b9c844 autoenable=true encryption=none name=gh-lfs type=git-lfs timestamp=1570642576.06742667s
"""]]
git annex 7.20190912-1~ndall+1
If I just proceed, populate and copy some data via lfs (example uses datalad's `create-sibling-github` to create a new repo):
[[!format sh """
$> ( cd /tmp/testds2 && touch 123 && git annex add 123 && git commit -m 'add 123' && datalad create-sibling-github -s origin testds2 && git push -u origin master && git annex copy --to=gh-lfs 123; git push origin git-annex; )
add 123
ok
(recording state in git...)
[master (root-commit) d2b2f52] add 123
1 file changed, 1 insertion(+)
create mode 120000 123
[WARNING] Authentication failed using a token.
.: origin(-) [https://github.com/yarikoptic/testds2.git (git)]
'https://github.com/yarikoptic/testds2.git' configured as sibling 'origin' for <Dataset path=/tmp/testds2>
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 307 bytes | 307.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To github.com:yarikoptic/testds2.git
* [new branch] master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.
copy 123 (to gh-lfs...)
ok
(recording state in git...)
Enumerating objects: 19, done.
Counting objects: 100% (19/19), done.
Delta compression using up to 4 threads
Compressing objects: 100% (15/15), done.
Writing objects: 100% (19/19), 1.66 KiB | 567.00 KiB/s, done.
Total 19 (delta 4), reused 0 (delta 0)
remote: Resolving deltas: 100% (4/4), done.
remote:
remote: Create a pull request for 'git-annex' on GitHub by visiting:
remote: https://github.com/yarikoptic/testds2/pull/new/git-annex
remote:
To github.com:yarikoptic/testds2.git
* [new branch] git-annex -> git-annex
"""]]
on a new clone I get a complaint that `url=` is missing, and no data is fetched
[[!format sh """
$> sudo rm -rf testds2-clone && git clone git@github.com:yarikoptic/testds2.git testds2-clone && ( cd testds2-clone && git annex init && git annex get 123; )
Cloning into 'testds2-clone'...
remote: Enumerating objects: 22, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 22 (delta 5), reused 21 (delta 4), pack-reused 0
Receiving objects: 100% (22/22), done.
Resolving deltas: 100% (5/5), done.
123@
init (merging origin/git-annex into git-annex...)
(recording state in git...)
(scanning for unlocked files...)
Invalid command: 'git-annex-shell 'configlist' '/~/yarikoptic/testds2.git''
You appear to be using ssh to clone a git:// URL.
Make sure your core.gitProxy config option and the
GIT_PROXY_COMMAND environment variable are NOT set.
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 annex enableremote origin
(Auto enabling special remote gh-lfs...)
Specify url=
ok
(recording state in git...)
get 123 (not available)
Try making some of these repositories available:
92ce3cfc-8c58-42db-8aa3-ea4d4b3a6011 -- yoh@hopa:/tmp/testds2
c9132e68-e9d8-40b5-ba34-5d60a8b9c844 -- gh-lfs
(Note that these git remotes have annex-ignore set: origin)
failed
git-annex: get: 1 failed
"""]]
so I had to enableremote it while providing URL I become able to `get` the file:
[[!format sh """
$> git annex enableremote gh-lfs autoenable=true type=git-lfs url=git@github.com:yarikoptic/testds2.git encryption=none && git annex get 123
enableremote gh-lfs ok
(recording state in git...)
get 123 (from gh-lfs...)
(checksum...) ok
(recording state in git...)
"""]]
Shouldn't that URL be recorded in remote.log? (similarly to `type=git` remotes)
[[!meta author=yoh]]
[[!tag projects/dandi]]

View file

@ -0,0 +1,12 @@
Following up on [DataLad's git-objects special remote idea PR](https://github.com/datalad/datalad/pull/3727#issuecomment-540116323), I have thought to try establishing git-lfs powered (special) remote on github, within assistant (installed a few days back) ran within Termux, on an android phone.
Within assistant web UI I did not find a good match for this scenario in "Add more repositories". What would it be (if any exists/defined already)?
Having found none, I've decided to try the closest match -- "remote server using ssh". But in that form, for some reason, after entering "github.com" for "Host name" results in "cannot resolve host name".
- I verified that github.com is reachable in chrome
- I thought that may be Termux "session" doesn't have access to DNS, so I switched to termux (where I started `git annex webapp`), and ran `ping github.com`.
- it did resolve the IP (to 192.30.253.113)
- but no ping came back
[[!meta author=yoh]]

View file

@ -0,0 +1,10 @@
[[!comment format=mdwn
username="yarikoptic"
avatar="http://cdn.libravatar.org/avatar/f11e9c84cb18d26a1748c33b48c924b4"
subject="comment 1"
date="2019-10-09T18:10:05Z"
content="""
FWIW -- seems to be a generic (not github.com specific) DNS issue, since fails to resolve other names as well.
In the dashboard there is a Warning about `RemoteControl crashed: user error (nice [... remotedaemon... exited 1)` -- could be related?
"""]]

View file

@ -0,0 +1,8 @@
[[!comment format=mdwn
username="Ilya_Shlyakhter"
avatar="http://cdn.libravatar.org/avatar/1647044369aa7747829c38b9dcc84df0"
subject="separate annex.git-add.largefiles and annex.git-annex-add.largefiles settings"
date="2019-10-10T18:33:50Z"
content="""
[[separate `annex.git-add.largefiles` and `annex.git-annex-add.largefiles` settings|todo/separate_annex.largefiles.git-add_and_annex.largefiles.git-annex-add_settings]] would let you configure `git add` to only add to git while still letting `git annex add` decide what gets annexed.
"""]]

View file

@ -0,0 +1,10 @@
[[!comment format=mdwn
username="bugmenot"
avatar="http://cdn.libravatar.org/avatar/d3f7106e378e83d54c010c230ff074b9"
subject="--link accepts itself"
date="2019-10-10T05:28:53Z"
content="""
Is there a good reason why `git annex p2p --link` will accept addresses that points to itself?
I'm trying to script automatic addition of .onion peers, and it's a bit annoying to have to filter the .onion pointing to the current repo instead of just adding all of the .onion urls and having it ignore/warn/fail on the one that is currently in .git/annex/creds/p2paddrs
"""]]

View file

@ -0,0 +1,5 @@
Could there be separate `annex.git-add.largefiles` and `annex.git-annex-add.largefiles` settings, applying to files added via `git add` and `git annex add`, respectively? If not given, their value defaults to the value of `annex.largefiles`.
Reason: to prevent `git add` from inadvertently adding annexed files in unlocked form, I set `* annex.largefiles=nothing` at repo root; but then, `git annex add` won't annex anything either, unless specifically asked. I want to use `git add` to add files to git only (since it can't add them to git-annex in locked form), and to use `git annex add` to add files to either git or annex based on `annex.git-annex-add.largefiles` setting.
Related: [[forum/lets_discuss_git_add_behavior]]

View file

@ -0,0 +1,17 @@
[[!comment format=mdwn
username="jason.dixon.email@aa0e536a2ec2877d6f666108dbbc6e39bbe87ac0"
nickname="jason.dixon.email"
avatar="http://cdn.libravatar.org/avatar/fbe9050fc83bbd536d307d87ea14d4bc"
subject="wanted content commands"
date="2019-10-10T08:16:59Z"
content="""
I've often thought it would be handy to have a preferred content expression and a requested files list that work together. Which is, I think, similar to what you're saying?
So you could do something like \"git annex wanted . --request <somefile>\" which would add it to a list of wanted files, that overrides the preferred content. Then you'd remove them also.
Use case for this would be requesting a file. Syncing the request to, say, a usb. Plugging that usb in somewhere else later, and having those files be automatically transferred. Then when the file reaches the destination it's dropped.
I guess this is possible already with the wanted expressions? What would that look like?
"""]]