Giter Club home page Giter Club logo

Comments (4)

dosubot avatar dosubot commented on June 25, 2024 2

Yes, it is possible to clone GitLab repositories using SSH in the incubator-devlake repository. The buildCloneCommand function in the clone_gitcli.go file includes handling for SSH URLs and private keys [1].

Regarding environment variables, there isn't a specific environment variable to enable cloning via SSH instead of HTTP/HTTPS. However, the method of cloning is determined by the URL scheme (e.g., ssh:// for SSH). You can configure the repository URL to use the SSH scheme to clone via SSH.

For example, you can set the repository URL in your configuration to use the SSH format:

GITLAB_REPO_URL: "ssh://[email protected]:username/repo.git"

This will ensure that the cloning process uses SSH.

Details

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.

To continue the conversation, mention @dosu.

from incubator-devlake.

dosubot avatar dosubot commented on June 25, 2024 2

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:

GITLAB_REPO_URL: "ssh://[email protected]: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 [1][2].

Details

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.

To continue the conversation, mention @dosu.

from incubator-devlake.

claudious05 avatar claudious05 commented on June 25, 2024

But how can i define it should always use ssh

from incubator-devlake.

mieliespoor avatar mieliespoor commented on June 25, 2024

I'm not sure there is a way to provide an ssh key to use to clone repositories, unless undocumented. This should perhaps be labeled as a feature request.

from incubator-devlake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.