[Bug][Gitextractor] Git extractor plugin fails with mutliple github tokens
Search before asking
- [x] I had searched in the issues and found no similar issues.
What happened
Whenever multiple github tokens are provided the gitextractor plugin starts to fail with following error
in failed: Cloning into bare repository '/tmp/gitextractor3209794320'... | remote: Support for password authentication was removed on August 13, 2021. | remote: Please see https://docs.github.com/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication. | fatal: Authentication failed for 'https://github.com/dreamplug-tech/caterpillar.git/' Error types: (1) *hintdetail.withDetail (2) *errors.errorString
If only keep one token it works correctly
What do you expect to happen
Gitextractor plugin should work correctly with multiple tokens
How to reproduce
Add multiple github tokens while setting up git connection and use github for gitextractor
Anything else
No response
Version
v.1.0.2-beta7
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
I found a similar unsolved discussion titled "Gitextractor failing with multiple github tokens" which might be relevant to your issue [1]. Additionally, there was a closed issue titled "[Bug][Module Name] Auth Token Connection Failed.](https://github.com/apache/incubator-devlake/issues/2576)" but it does not contain comments or a solution [2].
The Gitextractor plugin is expected to handle multiple GitHub tokens by speeding up the data collection process. Each token should be from a different GitHub account, not from the same account [3]. If you're encountering issues, it might be worth checking if the tokens are correctly configured and have the necessary permissions.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
Can't reproduce.
According to the code https://github.com/apache/incubator-devlake/blob/b34d5258dee9d6703df6d2915703323fdaa6c1b5/backend/plugins/github/api/blueprint_v200.go#L126 It would always pick the first token for collecting git data.
The error message you posted contains "remote: Support for password authentication was removed on August 13, 2021" Not sure if this is the root cause of your problem
I encountered a similar issue some time ago, are you using fine grained tokens and is your org using SAML SSO?
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.
We are facing the same issue, when adding multiple github tokens, the collect process starts to failed with the same error message as khalibartan shared.
Were any of them fine-grained tokens?