4

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
7
  • 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, 2018 at 3:04
  • The repo is using ssh, and by view status I mean just refresh the status buffer.
    – anon
    Aug 30, 2018 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, 2018 at 13:21
  • @npostavs I've updated the question with the backtrace and magit version number.
    – anon
    Aug 30, 2018 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, 2018 at 15:56

1 Answer 1

2

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 agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.