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

   <!-- Answer -->
   To ensure that cloning always uses SSH, you need to configure the repository 
URLs to use the SSH scheme. Unfortunately, there isn't a specific environment 
variable in the `incubator-devlake` repository to enforce SSH for all GitLab 
repository cloning. However, you can achieve this by setting the repository 
URLs to use the SSH format.
   
   For example, in your configuration, you can specify the repository URL like 
this:
   
   ```yaml
   GITLAB_REPO_URL: "ssh://g...@gitlab.com:username/repo.git"
   ```
   
   This will ensure that the cloning process uses SSH. The cloning method is 
determined by the URL scheme, so by setting the URL to use `ssh://`, you 
enforce the use of SSH for cloning.
   
   Additionally, the `CloneGitRepo` function in the `repo_cloner.go` file and 
the `buildCloneCommand` function in the `clone_gitcli.go` file handle SSH URLs 
and private keys, ensuring that SSH is used when the URL scheme is `ssh` 
<sup>[[1]](https://github.com/apache/incubator-devlake/blob/main/backend/plugins/gitextractor/tasks/repo_cloner.go)</sup><sup>[[2]](https://github.com/apache/incubator-devlake/blob/main/backend/plugins/gitextractor/parser/clone_gitcli.go)</sup>.
   
   
   <!-- Dosu Comment Footer -->
   <details>
   <summary>
   
   #### Details
   </summary>
   
   **About Dosu**
   This response is meant to be useful and save you time. It is **not meant to 
be a precise solution**, but rather a starting point for your own research.
   
   Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is 
irrelevant.
   </details>
   
   *To continue the conversation, 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