]> dgit.raspbian.org Git - git-annex.git/commitdiff
Added a comment: git-credential-netrc
authornick.guenther@e418ed3c763dff37995c2ed5da4232a7c6cee0a9 <nickguenther@web>
Thu, 8 Sep 2022 02:02:40 +0000 (02:02 +0000)
committeradmin <admin@branchable.com>
Thu, 8 Sep 2022 02:02:40 +0000 (02:02 +0000)
doc/bugs/http_remotes_ignore_annex.web-options_--netrc/comment_1_314bf6c825c8b4cd49de210f20f6cde2._comment [new file with mode: 0644]

diff --git a/doc/bugs/http_remotes_ignore_annex.web-options_--netrc/comment_1_314bf6c825c8b4cd49de210f20f6cde2._comment b/doc/bugs/http_remotes_ignore_annex.web-options_--netrc/comment_1_314bf6c825c8b4cd49de210f20f6cde2._comment
new file mode 100644 (file)
index 0000000..ff6af3c
--- /dev/null
@@ -0,0 +1,39 @@
+[[!comment format=mdwn
+ username="nick.guenther@e418ed3c763dff37995c2ed5da4232a7c6cee0a9"
+ nickname="nick.guenther"
+ avatar="http://cdn.libravatar.org/avatar/9e85c6ca61c3f877fef4f91c2bf6e278"
+ subject="git-credential-netrc"
+ date="2022-09-08T02:02:39Z"
+ content="""
+I've found a different workaround. `git` ships with an unmaintained(?) alternate netrc parser written in perl. You just need to install it:
+
+```
+[kousu@nigiri ~]$ sudo cp -p /usr/share/git/credential/netrc/git-credential-netrc.perl /usr/lib/git-core/git-credential-netrc  # install
+[sudo] password for kousu: 
+[kousu@nigiri ~]$ chmod 600 ~/.netrc                                                   # it's rightly picky about permissions
+[kousu@nigiri ~]$ git config --global credential.helper \"netrc -v\"
+[kousu@nigiri tmp.HBEKK9D4TS]$ cd $(mktemp -d)
+[kousu@nigiri tmp.oZpfrzbN2N]$ git clone http://localhost/.git annex-test              # this use ~/.netrc *directly*
+Cloning into 'annex-test'...
+[kousu@nigiri tmp.oZpfrzbN2N]$ cd annex-test/
+[kousu@nigiri annex-test]$ git annex get                                               # this uses ~/.netrc indirectly via git-credential
+get large.bin (from origin...) 
+using gpg for GPG operations
+Unable to read /home/kousu/.authinfo.gpg; skipping it
+Unable to read /home/kousu/.netrc.gpg; skipping it
+Unable to read /home/kousu/.authinfo; skipping it
+Opening /home/kousu/.netrc...
+ok
+(recording state in git...)
+```
+
+
+This seems to sidestep the problem! It's weird that `git clone` will read netrc directly, but `git credential fill` won't? Oh well.
+
+There's a [SO post](https://stackoverflow.com/a/31609584/2898673) about this script.
+
+
+I still think it would be good for the docs and the code to be made consistent: if `web-options` is supposed to invoke curl then make it invoke curl, or else not the corner cases where it won't invoke curl.
+
+Hope this helps someone out down the road.
+"""]]