401 Unauthorized when sending a GET request to my Github Codespaces private port from my local Postman #69610
Unanswered
yamcodes
asked this question in
Codespaces
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Bug
Body
Description of the Bug
Sending a Postman or CURL request to my Codespace (
-3000.github.dev
) with aX-Github-Token: ghu_%rest_of_token%
results in 401 Unauthorized.Changing the Port Visibility from private to public temporarily solves the issue and returns the expected content of the request, indicating that the URL is correct.
More details
My application is forwarded through port 3000 and available for consumption with a browser (by navigating to
https://%mycontainer%-3000.app.github.dev/
), after authenticating by logging with Github credentials in the interactive menu.I'm trying to achieve the same with Postman, so I can interact with my API that is hosted in the Codespace, using Postman.
It should be noted that the port is set to private, and that I have followed "Using command-line tools and REST clients to access ports" from the Github Codespaces Docs.
Here is the request/response:
It should also be noted that
ghu_%rest_of_token%
is granted by:Inside of the codespace.
Temporary Workaround
As mentioned above:
Beta Was this translation helpful? Give feedback.
All reactions