git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git credential-osxkeychain bug/feature?
@ 2018-01-25 17:16 Robert Leach
  2018-01-26  0:51 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Leach @ 2018-01-25 17:16 UTC (permalink / raw)
  To: git

Hi,

I wanted to submit an issue regarding the credential-osxkeychain interface functionality.  I don't know whether it's a bug or a feature request.  Maybe it's even impossible to address? - I don't know, but here's my issue.  Let me know if fixing/implementing this is a bad idea or if it's an issue relating to something wrong on my system and not an issue with git itself.

I have a git repo in a dropbox directory (not sure if that's relevant - just giving full disclosure).  I have set up git to not ask me for my password by using the credential-osxkeychain feature, and it works great... unless I'm connected via ssh to the machine that has a copy of my Dropbox on it.  Various git commands interrogate me for my login instead of using the credentials stored in the KA database on that remote machine, e.g.:

git remote show origin
Username for 'https://github.com': ^C

When I'm sitting at that machine, I do not get asked for my login credentials.

It's a minor issue, and kind of silly TBH.  I can always just work on my repo locally and synch, but if I'm working on a project that processes a large dataset, it's faster to edit the project on the machine with the data I'm testing it with.  I could VNC in or just synch after each change, which works around the issue, but it's nicer to just do everything on one ssh terminal session.

But perhaps access to KA from a remote ssh session is restricted for security reasons?  I'm just curious I suppose.  Should/can this work?

Thanks,
Rob

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: git credential-osxkeychain bug/feature?
  2018-01-25 17:16 git credential-osxkeychain bug/feature? Robert Leach
@ 2018-01-26  0:51 ` Jeff King
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2018-01-26  0:51 UTC (permalink / raw)
  To: rleach; +Cc: git

On Thu, Jan 25, 2018 at 12:16:33PM -0500, Robert Leach wrote:

> But perhaps access to KA from a remote ssh session is restricted for
> security reasons?  I'm just curious I suppose.  Should/can this work?

It's definitely not a restriction from the osxkeychain credential
helper. I believe that MacOS only unlocks the keychain for console
logins by default.

Googling around I turned up this[1]:

  security unlock-keychain -p <YourPassword> ~/Library/Keychains/login.keychain

but I don't even have a mac these days to see if that still works. And
according to [2] you may have to fiddle with auto-confirmation. Good
luck. :)

-Peff

[1] https://superuser.com/questions/270095/when-i-ssh-into-os-x-i-dont-have-my-keychain-when-i-use-terminal-i-do

[2] https://apple.stackexchange.com/questions/178139/how-can-i-access-the-keychain-remotely-from-the-command-line

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-26  0:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-25 17:16 git credential-osxkeychain bug/feature? Robert Leach
2018-01-26  0:51 ` Jeff King

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 NNTP newsgroup(s).