1

I've recently switched from spacemacs to radian and have suddenly run into magit prompting for my github password whenever I view the status of a repository (the repository is configured to use SSH). However, I am still able to update the repo's status in magit, as well as stage, commit, and push changes.

When I perform the same actions on the command line, I am not prompted for a password and it seems as if git is picking up the configuration correctly.

Emacs has the correct SSH_AGENT_PID and SSH_AGENT_SOCK present in getenv.

Backtrace after setting M-x toggle-debug-on-quit is available at https://gist.github.com/peschkaj/c0c102f8a5d383f603e1319ba9e7395c

Environment is:

  • Emacs 26.1
  • macOS 10.13.6
  • magit 2.13.0
  • Using radian as the basis of emacs configuration
  • Is your remote repo using an ssh url, or an https one? What do you mean by "view the status of a repository"? Does that mean fetch, or literally just refresh the status buffer? – npostavs Aug 30 '18 at 3:04
  • The repo is using ssh, and by view status I mean just refresh the status buffer. – Jeremiah Peschka Aug 30 '18 at 13:04
  • I'm surprised you get a prompt just for the status buffer. Maybe this is a ghub thing? Could you M-x toggle-debug-on-quit, hit C-g at the prompt, and post the resulting backtrace? – npostavs Aug 30 '18 at 13:21
  • @npostavs I've updated the question with the backtrace and magit version number. – Jeremiah Peschka Aug 30 '18 at 15:19
  • 1
    Okay, the prompting is from magit-gh-pulls, not magit itself. I don't know much about it, but github.com/sigma/magit-gh-pulls/issues/111 and/or github.com/sigma/magit-gh-pulls/issues/121 seem related. – npostavs Aug 30 '18 at 15:56
1

The solution to this was to supply a github user and oauth-token in the git config

git config --global --add github.user <user>
git config --global --add github.oauth-token <token>

Once both the oauth token and username are in place, and emacs has been restarted, I'm no longer prompted for my username and password.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.