incubator-devlake icon indicating copy to clipboard operation
incubator-devlake copied to clipboard

[Bug][Gitextractor] Git extractor plugin fails with mutliple github tokens

Open khalibartan opened this issue 9 months ago • 3 comments

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

khalibartan avatar May 06 '25 07:05 khalibartan

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

dosubot[bot] avatar May 06 '25 07:05 dosubot[bot]

Can't reproduce.

Image

Image

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

klesh avatar May 08 '25 06:05 klesh

I encountered a similar issue some time ago, are you using fine grained tokens and is your org using SAML SSO?

kostas-petrakis avatar May 09 '25 14:05 kostas-petrakis

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.

github-actions[bot] avatar Jul 09 '25 00:07 github-actions[bot]

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.

github-actions[bot] avatar Jul 16 '25 00:07 github-actions[bot]

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?

klesh avatar Aug 25 '25 08:08 klesh