-
-
Notifications
You must be signed in to change notification settings - Fork 119
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
Forge asks for user name and password for Github requests #293
Comments
Oh, and I use my Personal Token as the password when Emacs asks. I don't get any errors in this process. |
All of that sounds about right. I cannot tell what you might have done wrong. Sorry. |
Is there any debugging steps? |
Please post the prompts used to do so. |
It first asks for the username in the Emacs minibuffer with this prompt: Username for 'https://github.com': It then asks for the password in the minibuffer with: Password for 'https://DSMasterson@github.com': Filling in the password causes the operation (usually a Push) to complete properly. |
This prompt comes from Also evaluate: (list
(ignore-errors (forge-get-repository t))
(ignore-errors (ghub--host nil))
(ignore-errors (ghub--username (ghub--host nil) nil))) If |
Emacs does not report an error, so no backtrace. Your list expression reports the proper host and username. However, I'm finding that ghub.el is not loaded initially, so your list expression only works after loading the library. Even so, after loading the library, Magit still behaves the same way and works fine. When is ghub.el loaded normally? Is it not supposed to be loaded because I'm somehow working with HTTP and, thus, the url library? Is there something I'm supposed to change to move from url to forge? |
Further updates:
What am I missing? |
No. |
I'm having this trouble as a reproducible bug whenever attempting a commit to a "second" repository after launching emacs.
|
That sounds like a plausible cause. We had bugs that caused
... but I am having issues with that. It's not precise enough.
How exactly do you do that? I don't think forge can push git data, or are you talking about something else?
Please post that prompt here so I know which one you are talking about. |
You're correct. I meant to write that I used the standard
Upon escaping the prompt, using
With an almost identical corresponding message on the first line of the magit status buffer:
And a commit buffer that had been silently (and prematurely) created remains. It can't be deleted from the iBuffer buffer. One needs to select it and then kill it. Here's its line in the iBuffer buffer. Does this issue get re-opened? Doing so might attract more input from others.
The error message for this additional undesirable anomaly is:
Which is misleading since the |
@Boruch-Baum Please provide the same output that I requested from @DSMasterson. |
Do you really want all that? Just the output from the |
Leave out the |
Big difference:
|
That's how it is supposed to be. Do |
OK. Here goes.
BTW, I may as well plug the repository. My package |
So there are two issues.
I have added an advice to inject the correct behavior into Advice url-http-handle-authentication with a bugfix Upon receiving a 401 or 409 Unfortunately that function does not react correctly when the previous On Emacs releases before 27.1 it instead makes another request, which On Emacs 27.1 it does signal an error but without using the mechanism By the way, I recommend you stop using |
Upon receiving a 401 or 409 `url-http-parse-headers' calls `url-http-handle-authentication', which then makes another request, which now provides the authentication information. Unfortunately that function does not react correctly when the previous request provided authentication information but the server rejected it. In that case it would be appropriate to signal a `http' error. On Emacs releases before 27.1 it instead makes another request, which can result in either an infinite loop if all the information required for a request using basic authentication is already available, until the server refuses to comply; or, as in the case of `ghub' it results in the user being asked for their username and/or password, which is very confusing. On Emacs 27.1 it does signal an error but without using the mechanism intended to do so, resulting in an error that does not contain all the information needed to properly deal with it. See magit/forge#293.
I've taken your advice about removing magithub and can confirm that
after unloading features magithub* I am no longer prompted for my github
account name etc. I haven't yet needed to actually make and push a
commit to github to further test but will report. Since you've closed
the issue, I'll only report back if I encounter a problem. BTW, magithub
was architectured as a set of 15+ feautures (!!), so for the benefit of
potentially other readers ...
(dolist (f features)
(when (string-match "magithub" (symbol-name f))
(unload-feature f)))
If magithub is such trouble, why not remove it from melpa already? An
alternative might be to push a commit to the package that warns users
when using its interactive functions that it has become a source of
trouble etc.
Thanks for tracking all this down, through the different packages and
emacs versions.
…--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0
|
@vermiculus It might be time to think about that. |
Reported in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=50511. |
Am I missing something? Magit and Forge (and MagitHub before) worked fine for me for everything I've done with my repository on GitHub except that Emacs (I suspect GHub) always asks me for the user name and password for each operation.
What else am I supposed to do?
Emacs 26.3
forge-20200725.1419
ghub-20200801.808
The text was updated successfully, but these errors were encountered: