Merge branch 'master' of ssh://git-annex.branchable.com
This commit is contained in:
commit
bd2507de17
5 changed files with 199 additions and 0 deletions
108
doc/bugs/git_annex_checkpresentkey_removes_git_credentials.mdwn
Normal file
108
doc/bugs/git_annex_checkpresentkey_removes_git_credentials.mdwn
Normal file
|
@ -0,0 +1,108 @@
|
||||||
|
### Please describe the problem.
|
||||||
|
|
||||||
|
Calling `git annex checkpresentkey <key> <remote>` for a https git remote with authentication immediately removes credentials stored with git for said remote.
|
||||||
|
|
||||||
|
### What steps will reproduce the problem?
|
||||||
|
|
||||||
|
See transcript below.
|
||||||
|
|
||||||
|
### What version of git-annex are you using? On what operating system?
|
||||||
|
|
||||||
|
```
|
||||||
|
git-annex version: 10.20240430
|
||||||
|
build flags: Assistant Webapp Pairing Inotify DBus DesktopNotify TorrentParser MagicMime Feeds Testsuite S3 WebDAV
|
||||||
|
dependency versions: aws-0.24.1 bloomfilter-2.0.1.2 crypton-0.34 DAV-1.3.4 feed-1.3.2.1 ghc-9.6.5 http-client-0.7.17 persistent-sqlite-2.13.3.0 torrent-10000.1.3 uuid-1.3.15 yesod-1.6.2.1
|
||||||
|
key/value backends: SHA256E SHA256 SHA512E SHA512 SHA224E SHA224 SHA384E SHA384 SHA3_256E SHA3_256 SHA3_512E SHA3_512 SHA3_224E SHA3_224 SHA3_384E SHA3_384 SKEIN256E SKEIN256 SKEIN512E SKEIN512 BLAKE2B256E BLAKE2B256 BLAKE2B512E BLAKE2B512 BLAKE2B160E BLAKE2B160 BLAKE2B224E BLAKE2B224 BLAKE2B384E BLAKE2B384 BLAKE2BP512E BLAKE2BP512 BLAKE2S256E BLAKE2S256 BLAKE2S160E BLAKE2S160 BLAKE2S224E BLAKE2S224 BLAKE2SP256E BLAKE2SP256 BLAKE2SP224E BLAKE2SP224 SHA1E SHA1 MD5E MD5 WORM URL VURL X*
|
||||||
|
remote types: git gcrypt p2p S3 bup directory rsync web bittorrent webdav adb tahoe glacier ddar git-lfs httpalso borg rclone hook external
|
||||||
|
operating system: linux x86_64
|
||||||
|
supported repository versions: 8 9 10
|
||||||
|
upgrade supported from repository versions: 0 1 2 3 4 5 6 7 8 9 10
|
||||||
|
local repository version: 10
|
||||||
|
```
|
||||||
|
on Ubuntu 22.04 installed via nixpkgs.
|
||||||
|
|
||||||
|
### Please provide any additional information below.
|
||||||
|
|
||||||
|
With git credential configured to store them in ~/creds:
|
||||||
|
|
||||||
|
[[!format sh """
|
||||||
|
# If you can, paste a complete transcript of the problem occurring here.
|
||||||
|
# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log
|
||||||
|
|
||||||
|
$ cat ~/creds
|
||||||
|
cat: /home/icg149/creds: No such file or directory
|
||||||
|
$ git push
|
||||||
|
Username for 'http://localhost:3000': forgejo
|
||||||
|
Password for 'http://forgejo@localhost:3000':
|
||||||
|
Everything up-to-date
|
||||||
|
$ cat ~/creds
|
||||||
|
http://forgejo:forgejoforgejo@localhost%3a3000
|
||||||
|
$ git annex --debug checkpresentkey MD5E-s22--9fd0423717d1802f35d83d0663fa6074 origin
|
||||||
|
[2024-06-26 12:06:09.806467] (Utility.Process) process [785421] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","annex.debug=true","show-ref","git-annex"]
|
||||||
|
[2024-06-26 12:06:09.811952162] (Utility.Process) process [785421] done ExitSuccess
|
||||||
|
[2024-06-26 12:06:09.813689288] (Utility.Process) process [785422] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","annex.debug=true","show-ref","--hash","refs/heads/git-annex"]
|
||||||
|
[2024-06-26 12:06:09.820064447] (Utility.Process) process [785422] done ExitSuccess
|
||||||
|
[2024-06-26 12:06:09.821678763] (Utility.Process) process [785423] chat: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","annex.debug=true","cat-file","--batch"]
|
||||||
|
[2024-06-26 12:06:09.846601841] (Utility.Url) Request {
|
||||||
|
host = "localhost"
|
||||||
|
port = 3000
|
||||||
|
secure = False
|
||||||
|
requestHeaders = [("Accept-Encoding",""),("User-Agent","git-annex/10.20240430")]
|
||||||
|
path = "/forgejo/test1234.git/annex/objects/b9f/209/MD5E-s22--9fd0423717d1802f35d83d0663fa6074/MD5E-s22--9fd0423717d1802f35d83d0663fa6074"
|
||||||
|
queryString = ""
|
||||||
|
method = "HEAD"
|
||||||
|
proxy = Nothing
|
||||||
|
rawBody = False
|
||||||
|
redirectCount = 10
|
||||||
|
responseTimeout = ResponseTimeoutDefault
|
||||||
|
requestVersion = HTTP/1.1
|
||||||
|
proxySecureMode = ProxySecureWithConnect
|
||||||
|
}
|
||||||
|
|
||||||
|
[2024-06-26 12:06:09.849624508] (Utility.Process) process [785424] chat: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","annex.debug=true","credential","fill"]
|
||||||
|
[2024-06-26 12:06:09.875935065] (Utility.Process) process [785424] done ExitSuccess
|
||||||
|
[2024-06-26 12:06:09.876187369] (Utility.Url) Request {
|
||||||
|
host = "localhost"
|
||||||
|
port = 3000
|
||||||
|
secure = False
|
||||||
|
requestHeaders = [("Accept-Encoding",""),("Authorization","<REDACTED>"),("User-Agent","git-annex/10.20240430")]
|
||||||
|
path = "/forgejo/test1234.git/annex/objects/b9f/209/MD5E-s22--9fd0423717d1802f35d83d0663fa6074/MD5E-s22--9fd0423717d1802f35d83d0663fa6074"
|
||||||
|
queryString = ""
|
||||||
|
method = "HEAD"
|
||||||
|
proxy = Nothing
|
||||||
|
rawBody = False
|
||||||
|
redirectCount = 10
|
||||||
|
responseTimeout = ResponseTimeoutDefault
|
||||||
|
requestVersion = HTTP/1.1
|
||||||
|
proxySecureMode = ProxySecureWithConnect
|
||||||
|
}
|
||||||
|
|
||||||
|
[2024-06-26 12:06:10.002427959] (Utility.Process) process [785431] chat: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","annex.debug=true","credential","reject"]
|
||||||
|
[2024-06-26 12:06:10.04428136] (Utility.Process) process [785431] done ExitSuccess
|
||||||
|
[2024-06-26 12:06:10.044677033] (Utility.Url) Request {
|
||||||
|
host = "localhost"
|
||||||
|
port = 3000
|
||||||
|
secure = False
|
||||||
|
requestHeaders = [("Accept-Encoding",""),("User-Agent","git-annex/10.20240430")]
|
||||||
|
path = "/forgejo/test1234.git/annex/objects/zK/2F/MD5E-s22--9fd0423717d1802f35d83d0663fa6074/MD5E-s22--9fd0423717d1802f35d83d0663fa6074"
|
||||||
|
queryString = ""
|
||||||
|
method = "HEAD"
|
||||||
|
proxy = Nothing
|
||||||
|
rawBody = False
|
||||||
|
redirectCount = 10
|
||||||
|
responseTimeout = ResponseTimeoutDefault
|
||||||
|
requestVersion = HTTP/1.1
|
||||||
|
proxySecureMode = ProxySecureWithConnect
|
||||||
|
}
|
||||||
|
|
||||||
|
[2024-06-26 12:06:10.046640629] (Utility.Process) process [785439] chat: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","annex.debug=true","credential","fill"]
|
||||||
|
Username for 'http://localhost:3000': ^C
|
||||||
|
$ cat ~/creds
|
||||||
|
$
|
||||||
|
|
||||||
|
# End of transcript or log.
|
||||||
|
"""]]
|
||||||
|
|
||||||
|
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="m.risse@77eac2c22d673d5f10305c0bade738ad74055f92"
|
||||||
|
nickname="m.risse"
|
||||||
|
avatar="http://cdn.libravatar.org/avatar/59541f50d845e5f81aff06e88a38b9de"
|
||||||
|
subject="comment 1"
|
||||||
|
date="2024-06-26T10:20:29Z"
|
||||||
|
content="""
|
||||||
|
This seems to depend on if the remote has the key or not. If it doesn't have it the above happens, if it does have it this happens:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ git annex --debug checkpresentkey MD5E-s22--9fd0423717d1802f35d83d0663fa6074 origin
|
||||||
|
[2024-06-26 12:16:17.884306746] (Utility.Process) process [790839] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"annex.debug=true\",\"show-ref\",\"git-annex\"]
|
||||||
|
[2024-06-26 12:16:17.889865682] (Utility.Process) process [790839] done ExitSuccess
|
||||||
|
[2024-06-26 12:16:17.890586682] (Utility.Process) process [790840] read: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"annex.debug=true\",\"show-ref\",\"--hash\",\"refs/heads/git-annex\"]
|
||||||
|
[2024-06-26 12:16:17.896089346] (Utility.Process) process [790840] done ExitSuccess
|
||||||
|
[2024-06-26 12:16:17.897505598] (Utility.Process) process [790841] chat: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"annex.debug=true\",\"cat-file\",\"--batch\"]
|
||||||
|
[2024-06-26 12:16:17.917494738] (Utility.Url) Request {
|
||||||
|
host = \"localhost\"
|
||||||
|
port = 3000
|
||||||
|
secure = False
|
||||||
|
requestHeaders = [(\"Accept-Encoding\",\"\"),(\"User-Agent\",\"git-annex/10.20240430\")]
|
||||||
|
path = \"/forgejo/test1234.git/annex/objects/b9f/209/MD5E-s22--9fd0423717d1802f35d83d0663fa6074/MD5E-s22--9fd0423717d1802f35d83d0663fa6074\"
|
||||||
|
queryString = \"\"
|
||||||
|
method = \"HEAD\"
|
||||||
|
proxy = Nothing
|
||||||
|
rawBody = False
|
||||||
|
redirectCount = 10
|
||||||
|
responseTimeout = ResponseTimeoutDefault
|
||||||
|
requestVersion = HTTP/1.1
|
||||||
|
proxySecureMode = ProxySecureWithConnect
|
||||||
|
}
|
||||||
|
|
||||||
|
[2024-06-26 12:16:17.919583503] (Utility.Process) process [790842] chat: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"annex.debug=true\",\"credential\",\"fill\"]
|
||||||
|
[2024-06-26 12:16:17.948527204] (Utility.Process) process [790842] done ExitSuccess
|
||||||
|
[2024-06-26 12:16:17.94870605] (Utility.Url) Request {
|
||||||
|
host = \"localhost\"
|
||||||
|
port = 3000
|
||||||
|
secure = False
|
||||||
|
requestHeaders = [(\"Accept-Encoding\",\"\"),(\"Authorization\",\"<REDACTED>\"),(\"User-Agent\",\"git-annex/10.20240430\")]
|
||||||
|
path = \"/forgejo/test1234.git/annex/objects/b9f/209/MD5E-s22--9fd0423717d1802f35d83d0663fa6074/MD5E-s22--9fd0423717d1802f35d83d0663fa6074\"
|
||||||
|
queryString = \"\"
|
||||||
|
method = \"HEAD\"
|
||||||
|
proxy = Nothing
|
||||||
|
rawBody = False
|
||||||
|
redirectCount = 10
|
||||||
|
responseTimeout = ResponseTimeoutDefault
|
||||||
|
requestVersion = HTTP/1.1
|
||||||
|
proxySecureMode = ProxySecureWithConnect
|
||||||
|
}
|
||||||
|
|
||||||
|
[2024-06-26 12:16:18.071744964] (Utility.Process) process [790850] chat: git [\"--git-dir=.git\",\"--work-tree=.\",\"--literal-pathspecs\",\"-c\",\"annex.debug=true\",\"credential\",\"approve\"]
|
||||||
|
[2024-06-26 12:16:18.132959059] (Utility.Process) process [790850] done ExitSuccess
|
||||||
|
```
|
||||||
|
|
||||||
|
Does git-annex interpret the 404 in the case of the key not being on the remote as an authentication failure and then rejects the credentials? I think that should only happen on a 401...
|
||||||
|
"""]]
|
|
@ -0,0 +1,7 @@
|
||||||
|
I have a normal git/git-annex remote configured via https called "origin". This means for git-annex purposes (copy/move/drop/etc.) it is read-only.
|
||||||
|
|
||||||
|
I've implemented a special remote that is able to do store and remove operations on that same location, also via https. I configured this special remote with `--sameas=origin`, to signify that relationship.
|
||||||
|
|
||||||
|
Now ideally I would like operations like `git annex drop --from=origin` or `git annex copy --to=origin` to notice that origin itself cannot be used for these, and instead automatically fallback to the special remote that can do them.
|
||||||
|
|
||||||
|
I expected this to be the case already when specifying sameas, but apparently it isn't. Is it possible to achieve this?
|
14
doc/forum/Calculate_HMAC_of_special_remote.mdwn
Normal file
14
doc/forum/Calculate_HMAC_of_special_remote.mdwn
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
Hello,
|
||||||
|
|
||||||
|
I need to do some plumbing in a special remote. What is the best way to get the filenames of all the chunks belonging to a key?
|
||||||
|
From https://git-annex.branchable.com/internals/ I know that `.log.cnk` stores size and number of chunks. And that part of the cipher in remote.log is used as the HMAC encryption key.
|
||||||
|
|
||||||
|
I found that I can use `openssl` to calculate the HMAC, but what exactly do I need to feed it?
|
||||||
|
|
||||||
|
```
|
||||||
|
echo $PAYLOAD | openssl sha512 -hex -mac HMAC -macopt hexkey:$KEY_HEX
|
||||||
|
```
|
||||||
|
|
||||||
|
Or is there a git-annex plumbing command that I overlooked?
|
||||||
|
|
||||||
|
--lykos153
|
14
doc/todo/Size_of_unused_files.mdwn
Normal file
14
doc/todo/Size_of_unused_files.mdwn
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
It would be nice to have `git annex unused` report the total size of unused files.
|
||||||
|
|
||||||
|
I tried:
|
||||||
|
|
||||||
|
- ❌ `git annex unused`: doesn't show the size
|
||||||
|
- ❌ `git annex info`: doesn't list unused size
|
||||||
|
- ❌ `git annex info --unused`: doesn't work
|
||||||
|
- ❌ `git annex list --unused`: doesn't work
|
||||||
|
- ❌ `git annex find --unused`: doesn't work
|
||||||
|
|
||||||
|
Maybe I'm missing something, but it feels like having `git annex unused` and `git annex info` directly report it would be nice.
|
||||||
|
|
||||||
|
Cheers,
|
||||||
|
Yann
|
Loading…
Reference in a new issue