You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
I'm so excited about the GitHub Package! I seem to be unable to access cached credentials within the UI. I've been using an personal access token because I have 2FA enabled, but it's my understanding that it's not how it's supposed to work.
I get this error message whenever I perform a fetch.
git: 'credential-osxkeychain' is not a git command. See 'git --help'. fatal: could read Username for 'https://github.com': Device not configured
Sometime a pull/push works. However, it doesn't ever remember the credentials and I have to type them in every time. Do I have some wonky settings or is this a bug? Thank you!
Versions
Atom Version (atom --version):
Atom : 1.13.0
GitHub Package Version (git --git-dir ~/.atom/packages/github/.git rev-parse head): bea2da8
#597 will help with this, somewhat - if your native credential handler fails, you'll be prompted through Atom.
Atom won't automatically remember credentials for you, though (yet). To do that, you'll want to install the git osxkeychain credential helper mentioned in the error message; it's included in homebrew's version of git. To be used, it needs to be on your ${PATH}:
$ which git-credential-osxkeychain
And it needs to be set in your git configuration:
$ git config --get-all credential.helper
# If it's not there:
$ git config --global credential.helper osxkeychain
Thanks @smashwilson! My own issue seems to have been resolved so I am closing it out. @cmrberry please feel free to reopen if it still doesn't work for you.
@mauriciord Are you interacting with a remote over an https or ssh URL?
For https remotes, you'll want to install a credential helper that will store accepted usernames and passwords in your OS keychain. (The specifics on configuring this vary on different platforms.)
For ssh remotes, you'll want to configure an ssh agent or (if you're also using GPG signing) a gpg agent.
As a side benefit, this will also work for remote operations on the command-line 😄
Hey @smashwilson thanks for the help, it's a https remote, but i've already did this.
In VSCode and Terminal, i'm using normally without typing everytime the user and password.
Why only in Atom this is not working ?
Can you enable "git diagnostics" in the GitHub package settings, reproduce, then open your dev tools and expand the git -c gpg.program=... commit section in your console? That will enable GIT_TRACE and capture some information that would be helpful for seeing why your credential helper isn't being invoked correctly.
Sorry for the noob question, but why 2 osxkeychain ?
I suspect one is from your system configuration and one is from your global git configuration. You can use EDITOR=echo git config --system --edit to see where your system config is (if you have git installed from homebrew, it's likely under some /usr path).
Can you enable "git diagnostics" in the GitHub package settings, reproduce, then open your dev tools and expand the git -c gpg.program=... commit section in your console? That will enable GIT_TRACE and capture some information that would be helpful for seeing why your credential helper isn't being invoked correctly.
Hmm, I have a hunch. When git executes internal processes, it prepends an exec path where the git binaries live. Dugite sets the exec path to its own, bundled tools when it runs git commands. I'm wondering if the git-credential-osxkeychain binary is in the exec path for your native git install and also not on your system path. That would explain why your command-line git can find it but the dugite-managed git cannot, even with the same PATH.
From your git system path, it also looks like you're using the macOS system git rather than a homebrew install like I'm using. I'm betting homebrew puts the exec path on PATH as well which explains why it's working for me 😉
Can you share the output from these commands to confirm:
Ah ha! Yep, that's what's going on. A tentative solution: we can attempt to gather the exec path from a native git install and append it to the ${PATH} we use for git operations.
As a temporary workaround you should be able to run:
export PATH=${PATH}:/mongodb-osx-x86_64-3.4.0/bin;
# Setting PATH for Python 3.5
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"
export PATH
export PATH=${PATH}:$(git --exec-path)
it doesn't work for me,is anyone can help?thank you !
Activity
cmrberry commentedon Jan 23, 2017
Same thing, it asks me for my credentials every time I push, and doesn't even mention the osx keychain. Is there a setting I need to enable?
smashwilson commentedon Mar 16, 2017
#597 will help with this, somewhat - if your native credential handler fails, you'll be prompted through Atom.
Atom won't automatically remember credentials for you, though (yet). To do that, you'll want to install the git osxkeychain credential helper mentioned in the error message; it's included in homebrew's version of git. To be used, it needs to be on your ${PATH}:
And it needs to be set in your git configuration:
$ git config --get-all credential.helper # If it's not there: $ git config --global credential.helper osxkeychainhectorsector commentedon Mar 20, 2017
Thanks @smashwilson! My own issue seems to have been resolved so I am closing it out. @cmrberry please feel free to reopen if it still doesn't work for you.
mauriciord commentedon May 23, 2017
Same thing here, how did you resolve this ?
Every time i make Pull, Push or Fetch, the Atom requires my username and password
smashwilson commentedon May 23, 2017
@mauriciord Are you interacting with a remote over an https or ssh URL?
For https remotes, you'll want to install a credential helper that will store accepted usernames and passwords in your OS keychain. (The specifics on configuring this vary on different platforms.)
For ssh remotes, you'll want to configure an ssh agent or (if you're also using GPG signing) a gpg agent.
As a side benefit, this will also work for remote operations on the command-line 😄
mauriciord commentedon May 23, 2017
Hey @smashwilson thanks for the help, it's a https remote, but i've already did this.
In VSCode and Terminal, i'm using normally without typing everytime the user and password.
Why only in Atom this is not working ?
mauriciord commentedon May 23, 2017
When i type:
Outputs this:

Sorry for the noob question, but why 2
osxkeychain?smashwilson commentedon May 23, 2017
Good question!
Can you enable "git diagnostics" in the GitHub package settings, reproduce, then open your dev tools and expand the
git -c gpg.program=... commitsection in your console? That will enableGIT_TRACEand capture some information that would be helpful for seeing why your credential helper isn't being invoked correctly.I suspect one is from your system configuration and one is from your global git configuration. You can use
EDITOR=echo git config --system --editto see where your system config is (if you have git installed from homebrew, it's likely under some/usrpath).mauriciord commentedon Jun 8, 2017
HEY @smashwilson ,
I made this and:
git-Cgpg.txt
I used
EDITOR=echo git config --system --editand my terminal output this:/private/etc/gitconfigsmashwilson commentedon Jun 8, 2017
@mauriciord Excellent, thanks for the trace. I'll have a look in more detail soon.
I'm wondering if I'm passing the wrong PATH to that git invocation somehow, since
git credential-osxkeychainis on your shell path... 🤔smashwilson commentedon Jun 9, 2017
Hmm, I have a hunch. When git executes internal processes, it prepends an exec path where the git binaries live. Dugite sets the exec path to its own, bundled tools when it runs git commands. I'm wondering if the
git-credential-osxkeychainbinary is in the exec path for your native git install and also not on your system path. That would explain why your command-line git can find it but the dugite-managed git cannot, even with the samePATH.From your git system path, it also looks like you're using the macOS system git rather than a homebrew install like I'm using. I'm betting homebrew puts the exec path on
PATHas well which explains why it's working for me 😉Can you share the output from these commands to confirm:
git --exec-pathecho ${PATH}which git-credential-osxkeychainmauriciord commentedon Jun 9, 2017
Of course @smashwilson ,
git --exec-path
/Applications/Xcode.app/Contents/Developer/usr/libexec/git-coreecho ${PATH}
which git-credential-osxkeychain
Does not output anything
smashwilson commentedon Jun 9, 2017
Ah ha! Yep, that's what's going on. A tentative solution: we can attempt to gather the exec path from a native git install and append it to the
${PATH}we use for git operations.As a temporary workaround you should be able to run:
And relaunch Atom.
jaydenseric commentedon Jun 20, 2017
@smashwilson running that did not work for me.
I had to add
export PATH=${PATH}:$(git --exec-path)to~/.bash_profile.mauriciord commentedon Jun 26, 2017
I had to add too @jaydenseric
Working now :)
openks commentedon Jul 5, 2017
~/.bash_profile
it doesn't work for me,is anyone can help?thank you !
jonnylink commentedon Aug 22, 2017
Word to the wise, if you follow the other tickets you'll just end up back here.