-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
Error registering repository from org #729
Comments
You would not be the first user who read and quoted that, and could have fixed the issue by doing just that but still opened such an issue instead. Please double check that URL. Check whether the capitalization has changed, for example. And while I am not sure not this is needed here, also make sure the token has the |
Hmmm, I quite not get the informational message. This is a repo that I have just cloned. Below a bit more details that I hope help troubleshoot: I post here the
The remote has been added like:
I did notice that, when doing
Yeah, I double checked this (re-created the token making sure the roles were set). |
After a rename, when using git and the web interface, the old url redirects to the new. The same does not happen when using the API. So it is possible to copy an URL from some outdated wiki, use that to clone and succeed, but have the API calls still fail. You had to anonymize, but note that in your message both |
I copied the URL to do Note that this is the SSH version of the URL that Github provides. I still don't understand what are you referring to.
A typo. The capitals were meant to highlight that anonymized. I did not use All of the appearances where the anonymization happens match what I expect in terms of the organization and repository names. |
In that case we can (almost) know that it is up-to-date. I.e., it now makes sense to look at other possible causes.
This is what could have happened: (And I am not able to know whether it has. I can only ask you to double-check and then have to take your word for it.)
|
I understand if that could be the case, the mapping that Github does under the hood. What actually happened is the following:
I still don't understand what have I missed, after re-reading forge's and ghub's documentation on setting up a new forge 😞 |
For reference, the
The line |
Organization owners can restrict API access. Contact the admin of your organization to learn whether (1) you have the permissions to use (2) classic tokens. |
This was activated now following this documentation with me being present. I am not aware of anything else per Github documentation (enrollment or any other setting needed). If you are, please let me know. One thing that strikes me is that, if I modify the token to be |
In that case the problem is that Github returns 404 for resources that exist but you are not allowed to access, to avoid disclosing the [non-]existence of said resources. That indeed often makes it harder to figure out what is going wrong. |
Ok, but how come if I try to setup forge for my own repository under no organization, I get the same response? 🤔 |
I've it's a private repository, then Github also wouldn't want to disclose its existence to someone claiming to be you, just like for a private organization repository. I've it's public, the issue could be that Github errs on the side of playing it safe too much. Which reminds me, is the repository you originally wanted to access private? |
Yes, the org repo I would like to fetch is private. Any further consideration I need to take regarding that? |
Can't think of anything right now. Also, I likely will stop responding for a week or so, because I'm rather busy. |
Ok, I understand. You own your agenda and decide where to put time. However, let me explain once again that I believe this is not a "support" issue. After having read all documentation from Here, if it is of any help, the trace for attempted registering magit/forge (same behavior, same error as with other private repos).
Magit 20241130.1707 [>= 20241130.1707], Transient 20241125.1302, Forge 20241201.700, Git 2.45.2, Emacs 29.4, gnu/linux Let me know if there is any way I can help debugging this and find out the root cause. I think several tangents were already explored. |
@Duy-X Thanks for your take. It seems like the screenshot you posted is taken from the Github tokens view, the step you mention is required for organizations that use or enforce SAML SSO, but the organizations I belong to are not using nor enforcing such, and so I don't even get to see the button shown. |
@tarsius I narrowed down the issue. IF I switch auth-source to an encrypted authinfo file (with the same content as the entry in my password-store, then I can make the pull. The config I had that was causing trouble is below:
I don't see anything weird, does this grant registering a bug upstream? |
Try this patch #720 (comment). |
I did, and gave me a 401 error. |
I expected to add a repository for the organization I belong in Github upon issuing
forge-add-repository
, however, I see the following error:where TOKEN has been anonymized.
The trace below (anonymized organization and repo with ORG and REPO respectively):
The version I run is the following:
Magit 20241124.1509 [>= 20241124.1509], Transient 20241125.1302, Forge 20241123.2131, Git 2.45.2, Emacs 29.4, gnu/linux
The text was updated successfully, but these errors were encountered: