[Bug][Github] Github Connection not working, PAT is not being validated
Search before asking
- [X] I had searched in the issues and found no similar issues.
What happened
I work in a organisation, and when I tried to add a github connection by following the docs, the PAT is not validated
The devlake.log file shows this error
What is the reason for this error?
This bug might be because, the org uses few https certificates for https requests, so is there a way to upload these certificates during initiating a connection.
Or is it something else?
What do you expect to happen
- Able to use above mentioned https certificates for required connection (this is applicable for Bitbucket also)
- Or any other fix
How to reproduce
- Initiate the github connection
- Generate and Use PAT to authenticate
- But for our organisation, PAT is not being validated
Anything else
No response
Version
main
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Thanks for your valuable feedback and suggestion.
Make sure the endpoint of the GitHub connection was https://api.github.com/
Make sure you can use curl or postman to access the URL https://api.github.com/user success with your token.
Hi @mappjzc, since we are using github enterprise and my github account is from the same enterprise, I used https://hostname/api/v3/ and it seems to be working now, but before I used different endpoint.
And also, https://api.github.com didn't work for a PAT generated from personal github account. What might be the reason for that?
Thanks for your help!!
Hi @mappjzc, since we are using github enterprise and my github account is from the same enterprise, I used
https://hostname/api/v3/and it seems to be working now, but before I used different endpoint.And also,
https://api.github.comdidn't work for a PAT generated from personal github account. What might be the reason for that?Thanks for your help!!
I don't know what is your meaning about didn't work for a PAT generated from personal GitHub account. Can you show more details?
In the sense, initially I tried to add 2 github connections
- One with my personal github account, with endpoint
https://api.github.com/and PAT generated from this account, and this one didnt work in theconfig-ui, but I was able to usecurlto access this token - Second one was with my enterprise given github account and their endpoint
https://hostname/api/v3/and PAT generated from that account. This worked with both theconfig-uiandcurl.
The first connection showed this error

And this was the log in devlake.log

Hi, @Suhasr76 , Would you mind sharing your curl command? Thanks.
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.
This issue has been automatically marked as stale because it has been inactive for 60 days. It will be closed in next 7 days if no further activity occurs.
This issue has been automatically marked as stale because it has been inactive for 60 days. It will be closed in next 7 days if no further activity occurs.
This issue has been closed because it has been inactive for a long time. You can reopen it if you encounter the similar problem in the future.