Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why not use git-credential-cache? #194

Open
znewman01 opened this issue Nov 24, 2022 · 2 comments
Open

Why not use git-credential-cache? #194

znewman01 opened this issue Nov 24, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@znewman01
Copy link

Git has a credential cache of its own that looks very similar to the gitsign-credential-cache.

I assume there's a good reason not to use it; can we add that to the README?

@znewman01 znewman01 added the bug Something isn't working label Nov 24, 2022
@wlynch
Copy link
Member

wlynch commented Nov 28, 2022

They are very similar! (I based most of what we did on it)

Most of it comes from we weren't (and in some aspects still aren't) sure what we wanted the cache to look like. It was easy enough to write an in-memory cache that we had control over.

The existing git-credential-cache and credential helpers are primarily intended for getting credentials for remote operations. If we reused the same cache instance we'd have to be very careful to avoid accidentally let git try to use signing creds as remote passwords.
We could probably spawn the git-credential-cache to a different path and encode the keypair as a "password" if we wanted to. The main concern here is it we would need to be careful and try and make it difficult for users to misconfigure it - i.e. if we have a similar setup as we do now where users need to specify the socket path, it would be really easy to point it to the remote cache since that's what the cache wants to default to.

So tl;dr the main benefit is it prevents co-mingling of push/pull and signing creds, but we could use it if we wanted to.

@hickford
Copy link

hickford commented Jan 4, 2023

FYI Git for Windows ships without git-credential-cache (though it is possible to build on Windows 10)

credential-cache unavailable; no unix socket support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants