From: Bo Anderson <mail@boanderson.me>
To: Robert Coup <robert.coup@koordinates.com>
Cc: Jeff King <peff@peff.net>, M Hickford <mirth.hickford@gmail.com>,
Bo Anderson via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH 0/4] osxkeychain: bring in line with other credential helpers
Date: Tue, 2 Apr 2024 14:53:03 +0100 [thread overview]
Message-ID: <98F1A6E9-4553-48BE-830C-8FDA9F3B5744@boanderson.me> (raw)
In-Reply-To: <CAFLLRpJZg3UhBRfihtjUsXcGSod4FhDCs8fD1k-=5SLnAdHeQw@mail.gmail.com>
The test script does not interact well with the env filtering. This was the case before this change too.
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.
Bo
> On 2 Apr 2024, at 14:21, Robert Coup <robert.coup@koordinates.com> wrote:
>
> Hi all,
>
>> All that said, I'd be surprised if testing osxkeychain in the CI
>> environment worked. Back when I worked on it in 2011, I found that I had
>> to actually run the tests in a local terminal; even a remote ssh login
>> could not access the keychain. It's possible that things have changed
>> since then, though, or perhaps I was imply ignorant of how to configure
>> things correctly.
>
> I have gotten keychain working in Github Actions before: there's some
> helpers for it, but you can also basically do it manually via the
> steps from [1]. Basically anyone who needs to do Apple code-signing in
> CI has to make it work.
>
> @Bo, how are you actually testing this manually? Following these steps:
>
> $ make
> $ (cd contrib/credential/osxkeychain && make)
> $ ln -s contrib/credential/osxkeychain/git-credential-osxkeychain .
> $ cd t
> $ make GIT_TEST_CREDENTIAL_HELPER=osxkeychain t0303-credential-external.sh
>
> I get 'A keychain cannot be found to store "store-user".' in a popup
> dialog when #2 runs; then similar for other tests in 0303. For #14 I
> get a slight alternative with "A keychain cannot be found". There's a
> "Reset To Defaults" button, but that wipes everything. AFAIK I have a
> relatively normal setup, with a login keychain as default. macOS
> 14.3.1; arm64.
>
> $ security list-keychains
> "/Users/rc/Library/Keychains/login.keychain-db"
> "/Library/Keychains/System.keychain"
> $ security default-keychain
> "/Users/rc/Library/Keychains/login.keychain-db"
> $ security unlock-keychain
> password to unlock default: ...
>
> I don't see any settings or code for setting which keychain the
> credential helper uses, so I guess it's the default one?
>
> Cheers,
>
> Rob :)
>
> [1] https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development
next prev parent reply other threads:[~2024-04-02 13:53 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-17 23:34 [PATCH 0/4] osxkeychain: bring in line with other credential helpers Bo Anderson via GitGitGadget
2024-02-17 23:34 ` [PATCH 1/4] osxkeychain: replace deprecated SecKeychain API Bo Anderson via GitGitGadget
2024-02-18 6:08 ` Eric Sunshine
2024-02-18 14:48 ` Bo Anderson
2024-02-18 18:39 ` Eric Sunshine
2024-02-17 23:34 ` [PATCH 2/4] osxkeychain: erase all matching credentials Bo Anderson via GitGitGadget
2024-02-17 23:34 ` [PATCH 3/4] osxkeychain: erase matching passwords only Bo Anderson via GitGitGadget
2024-02-17 23:34 ` [PATCH 4/4] osxkeychain: store new attributes Bo Anderson via GitGitGadget
2024-02-18 6:31 ` Eric Sunshine
2024-02-18 6:38 ` [PATCH 0/4] osxkeychain: bring in line with other credential helpers Eric Sunshine
2024-02-18 20:40 ` M Hickford
2024-02-18 23:23 ` Bo Anderson
2024-03-04 8:00 ` M Hickford
2024-03-07 9:47 ` Jeff King
2024-04-02 13:21 ` Robert Coup
2024-04-02 13:53 ` Bo Anderson [this message]
2024-04-02 14:54 ` Robert Coup
2024-04-01 21:40 ` M Hickford
2024-04-01 22:16 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=98F1A6E9-4553-48BE-830C-8FDA9F3B5744@boanderson.me \
--to=mail@boanderson.me \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=mirth.hickford@gmail.com \
--cc=peff@peff.net \
--cc=robert.coup@koordinates.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).