git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/4] osxkeychain: bring in line with other credential helpers

From
Robert Coup <robert.coup@koordinates.com>
Date
Apr 2, 2024, 14:54 UTC
Message-ID
<CAFLLRp+Dd5M5Y+uoSpPk8-xpFHc_kBJJQfiHr4rt34ey0HAXbg@mail.gmail.com>
In-Reply-To
<98F1A6E9-4553-48BE-830C-8FDA9F3B5744@boanderson.me>
Hi Bo,
On Tue, 2 Apr 2024 at 14:53, Bo Anderson <mail@boanderson.me> wrote:
>
> The test script does not interact well with the env filtering. This was the case before this change too.

I guess without writing a helper-specific test or having some per-helper-setup thing it's a bit tricky.

Show 5 quoted lines
> To interact with your default keychain, you will need:
>
> GIT_TEST_CREDENTIAL_HELPER_SETUP="export HOME=$HOME”
>
> This is because the default macOS user keychain is local to your home directory - that’s why it’s giving errors about not finding any.
And with that, the tests all pass :-) Comparing with master where 7/21 failed.
Tested-by: Robert Coup <robert.coup@koordinates.com>

Could we document that setup step somewhere? I guess the simplest is probably just to put it in the header of t/t0303-credential-external.sh; maybe along the lines of the patch below.

Rob :)
diff --git a/t/t0303-credential-external.sh b/t/t0303-credential-external.sh
index 095574bfc6..e4e693b233 100755
--- a/t/t0303-credential-external.sh
+++ b/t/t0303-credential-external.sh
@@ -27,6 +27,13 @@ timeout, you can test that feature with:
 If your helper requires additional setup before the tests are started,
 you can set GIT_TEST_CREDENTIAL_HELPER_SETUP to a sequence of shell
 commands.
+
+- osxkeychain:
+
+  Because the default macOS user keychain is local to your home
+  directory, you will need:
+
+    GIT_TEST_CREDENTIAL_HELPER_SETUP="export HOME=$HOME”
 '

 . ./test-lib.sh
Previous: Bo AndersonNext: M Hickford
Message 17 of 19 in “osxkeychain: bring in line with other credential helpers”
  1. 0/4 osxkeychain: bring in line with other credential helpersBo Anderson via GitGitGadget, Feb 17, 2024
  2. 1/4 osxkeychain: replace deprecated SecKeychain APIBo Anderson via GitGitGadget, Feb 17, 2024
  3. Eric SunshineFeb 18, 2024
  4. Bo AndersonFeb 18, 2024
  5. Eric SunshineFeb 18, 2024
  6. 2/4 osxkeychain: erase all matching credentialsBo Anderson via GitGitGadget, Feb 17, 2024
  7. 3/4 osxkeychain: erase matching passwords onlyBo Anderson via GitGitGadget, Feb 17, 2024
  8. 4/4 osxkeychain: store new attributesBo Anderson via GitGitGadget, Feb 17, 2024
  9. Eric SunshineFeb 18, 2024
  10. Eric SunshineFeb 18, 2024
  11. M HickfordFeb 18, 2024
  12. Bo AndersonFeb 18, 2024
  13. M HickfordMar 4, 2024
  14. Jeff KingMar 7, 2024
  15. Robert CoupApr 2, 2024
  16. Bo AndersonApr 2, 2024
  17. Robert CoupApr 2, 2024
  18. M HickfordApr 1, 2024
  19. Junio C HamanoApr 1, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.