dosubot[bot] commented on issue #7949:
URL: 
https://github.com/apache/incubator-devlake/issues/7949#issuecomment-2306892878

   <!-- Answer -->
   I found two similar closed issues that might be relevant to your problem:
   
   1. **[Bug][Git Extractor] Git Extractor task failed in a GitHub blueprint**: 
This issue was resolved by changing the Docker base image 
<sup>[[1]](https://github.com/apache/incubator-devlake/issues/3719)</sup>.
   2. **[Bug][GitExtractor] cloneGitRepo ended unexpectedly: reference delta 
not found**: This issue was resolved by updating the `go-git` module 
<sup>[[2]](https://github.com/apache/incubator-devlake/issues/6159)</sup>.
   
   To resolve the error when running a pipeline with `gitextractor` on `beta7` 
for a Bitbucket server repository, ensure that the `gitextractor` stage is 
correctly added to the pipeline plan. Here is the relevant part of the code:
   
   ```go
   // add gitex stage
   if utils.StringsContains(scopeConfig.Entities, plugin.DOMAIN_TYPE_CODE) {
       cloneUrl, err := errors.Convert01(url.Parse(repo.CloneUrl))
       if err != nil {
           return nil, err
       }
       cloneUrl.User = url.UserPassword(connection.Username, 
connection.Password)
       stage = append(stage, &coreModels.PipelineTask{
           Plugin: "gitextractor",
           Options: map[string]interface{}{
               "url":    cloneUrl.String(),
               "name":   repo.BitbucketId,
               "repoId": 
didgen.NewDomainIdGenerator(&models.BitbucketServerRepo{}).Generate(connection.ID,
 repo.BitbucketId),
               "proxy":  connection.Proxy,
           },
       })
   }
   ```
   
   Ensure that `scopeConfig.Entities` includes `plugin.DOMAIN_TYPE_CODE` and 
that the `cloneUrl` is correctly formed with the necessary credentials. If you 
encounter a `403` error, it is usually caused by the permission of your tokens. 
Make sure you are using a supported authentication method and that your token 
has the necessary permissions.
   
   Additionally, consider upgrading to v0.15.x as it includes fixes for some 
known issues with the `gitextractor` task 
<sup>[[3]](https://github.com/apache/incubator-devlake/blob/main/backend/plugins/bitbucket_server/api/blueprint_v200.go)</sup><sup>[[4]](https://github.com/apache/incubator-devlake-website/blob/main/docs/Troubleshooting/Configuration.md)</sup><sup>[[5]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v1.0/Troubleshooting/Configuration.md)</sup><sup>[[6]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.17/Troubleshooting/Configuration.md)</sup><sup>[[7]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.18/Troubleshooting/Configuration.md)</sup>.
   
   For the specific permissions required for the token used in the 
`gitextractor` task for Bitbucket server repositories, ensure the token has the 
following permissions:
   
   - `Account:Read`
   - `Workspace`
   - `membership:Read`
   - `Repositories:Read`
   - `Projects:Read`
   - `Pull requests:Read`
   - `Issues:Read`
   - `Pipelines:Read`
   - `Runners:Read` 
<sup>[[8]](https://github.com/apache/incubator-devlake/blob/main/config-ui/public/onboard/step-2/bitbucket.md)</sup>.
   
   Regarding the `http.sslVerify` option, it is handled by setting the 
environment variable `GIT_SSL_NO_VERIFY` to `true` if the 
`IN_SECURE_SKIP_VERIFY` configuration is enabled. However, there are known 
issues with self-signed certificates. A better approach would be to add your 
root CA to the `devlake` container 
<sup>[[9]](https://github.com/apache/incubator-devlake/blob/main/backend/plugins/gitextractor/parser/clone_gitcli.go)</sup><sup>[[4]](https://github.com/apache/incubator-devlake-website/blob/main/docs/Troubleshooting/Configuration.md)</sup><sup>[[10]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.15/Troubleshooting/Configuration.md)</sup>.
   
   If the issue persists, please provide more details or consider upgrading to 
a newer version.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@devlake.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to