Can't get profile information error
已回答
I'm using IntelliJ IDEA 2024.2.2 (Ultimate Edition)
I found today that I wasn't able to update a project I've been working on for months in China by pulling new changes from GitHub.
Recently I moved to Australia, and it is what it is.
I get an error that reads "Invalid authentication data. Can't get profile information Can't parse GitHub response".

I tried logging in again via GitHub page, it didn't help. I created a new GitHub personal access token with all the same permissions I had before. I'm still getting the same error.
请先登录再写评论。
Please enable debug logs (Help - Diagnostic Tools - Debug Log Settings...) for the following categories
org.jetbrains.plugins.github
Then please reproduce the issue and share the entire logs folder zipped as per https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files
You may upload them to: https://uploads.jetbrains.com/
Sure, Dino. Please check the following file
Upload id: 2024_09_19_MAbvUEdCrbCVnDjbvFxkqu (file: ken-Can't get profile information error-idea.log)
Does the issue occur if you use https instead of just typing github?
Also, are you having issues accessing github from your browser?
Is github reachable from the terminal inside iDE? Please try sending a simple ping or curl request.
Yes, tried but got the same error by accessing github from browser(authorize successfully on website page, but same error in IDE)
Also, github.com is reachable from terminal in IDE.
A tricky method to work it out is setting SSH key on github setting page.
Afterwards, clone the project in my mac terminal then open in IDEA. Using mac terminal to commit and push my changes. :)
Even though that method works for me, I still want to use the token in IDEA.
Can you try to make an api request from the IDE terminal towards the Github repo?
Or via http client: https://www.jetbrains.com/help/idea/http-client-in-product-code-editor.html
Does that work?
tried in IDE termininal but failed. Not sure why (:
Hi,
What is the response? Did you try the http client?
Yup, correct my reply this morning.
Regarding the api request towards github repo, both terminal and http client are working fine.
but IDEA still can not recognize the token:
Attach the pic for above error:
How is the terminal working fine when the response is 301 error and response body is empty?
What kind of request are you sending?
Using like this:
curl -H "Authorization: token ghp_TOKEN" https://api.github.com/repos/octocat/hello-world
What happens when you try oauth method? What is the error message you get? Can you try this and re-send logs please?
Sorry to update: The pic for error is from “login github via token”in IDEA. Not for api request
Regarding all the api requests via terminal and HTTP, we are following the github guideline:
https://docs.github.com/en/rest/quickstart?apiVersion=2022-11-28
attach the log here:
Upload id: 2024_09_20_HKc2jkM6zbdh5n56bWEc4G (file: ken-Can't get profile information error-idea-02.log)
The Key logs for error in IDEA:
2024-09-21 02:42:59,824 [ 21281] FINE - #o.j.p.g.a.GithubApiRequestExecutor - Request: https://api.github.com/user get profile information : Connecting
2024-09-21 02:43:01,928 [ 23385] FINE - #o.j.p.g.a.GithubApiRequestExecutor - Request: GET https://github.com/user : Connected
2024-09-21 02:43:01,939 [ 23396] FINE - #o.j.p.g.a.GithubApiRequestExecutor - Can't get profile information
org.jetbrains.plugins.github.exceptions.GithubJsonException: Can't get profile information
Can't parse GitHub response
at org.jetbrains.plugins.github.api.GithubApiContentHelper.readJson(GithubApiContentHelper.kt:91)
at org.jetbrains.plugins.github.api.GithubApiContentHelper.readJsonObject(GithubApiContentHelper.kt:63)
Maybe the answer is: RESTApi from github is working?
As we can check the above requests I sent to github, all of responses is 301 error and response body is empty.
Trying to contact github team?
Can you please provide full logs?
Also, please enable debug logs (Help - Diagnostic Tools - Debug Log Settings...) for the following category:
org.jetbrains.plugins.github
And reproduce the issue.
Are you sure you are using the right token?
Sure,"Log in to Github page" and “Login with token” are reproducing now:
Firstly, the token is definitely valid, generated last week.
Then, “Log in to Github” is also failed, even though the web page is normal.
The logs is uploaded now
Upload id: 2024_09_30_EEJ9rsTvSPCwnu4SKseuok (file: idea.log)
Hey Dino, why not set up a call in Skype/Zoom/Teams/Google chat? Hope we can talk and resolve it quickly, if possible.
Unfortunately, we do not offer such service.
Can you please open http request file in the IDE, and send a request:
GET https://api.github.com/user
Accept: application/json
Authorization: token ghp_token
What is the response?
As we can see to get user info from the above request:
According to the document they sent, I changed to request for events in user repository, then it is success!
However, we still can not login github in IDEA via that token:
That's the problem what I trying to say, and I kindly feel lost : )
Hi Ken,
Please see: https://github.com/desktop/desktop/issues/16072
Please try to reach out to github.
Sure, I will.
Hey KenSpeedIt , are you able to resolve this issue? I am facing same while accessing github copilot. First thing I have done is verify my email in github but still same issue is coming. idea. debug logs pointing that Jetbrains git plugin is broken while connecting to github. Please note I am only trying to connect to github to access github copilot but our actual repo is in some other VCS repo (not in Github) if that setup is breaking github plugin in Jetbrains?
Dino Letic - Git and Github coplit plugins are managed by Jetbrains?
Copilot is not managed by us. Our Github plugin is indeed. Logs would be helpful in this case.