Populate .ssh folder automatically so that submodules accessing with ssh protocol can be retrieved without extra config (OD-140)
Michael Weimann opened 6 years ago

I am trying to build a project that contains Git submodules via SSH.

As long as there are no project SSH keys available I added an API user.
This user has been granted access rights for the project and a SSH key.

When running the build it complains about "Host key verification failed.".
I am not sure how to approach this issue: Maybe adding a config field for "valid host keys"?

  • Robin Shen commented 6 years ago

    Please provide below information:

    1. What platform OneDev server is running on?
    2. Is OneDev server itself running inside docker container?
    3. Is the build running with Docker executor or Kubernetes executor?
  • Michael Weimann commented 6 years ago

    What platform OneDev server is running on?

    It is running as a Docker container. Host system is a Debian Buster.

    Is OneDev server itself running inside docker container?

    Yes.

    Is the build running with Docker executor or Kubernetes executor?

    Docker executor

  • Robin Shen commented 6 years ago

    You may mount an external .ssh folder containing id_rsa and known_hosts so that OneDev can use that key to talk with OneDev server. For instance:

    docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v ~/.ssh:/root/.ssh -v $(pwd)/onedev:/opt/onedev -p 6610:6610 -p 6611:6611 1dev/server:3.1.2
    

    Also in 3.2.0 will improve the docker container so that a .ssh folder is populated automatically without this extra mapping.

  • Robin Shen changed fields 6 years ago
    Name Previous Value Current Value
    Type
    Support Request
    Improvement
  • Robin Shen changed iterations 6 years ago
    Previous Value Current Value
    empty
    3.2.0
  • Robin Shen changed title 6 years ago
    Previous Value Current Value
    Build "Host key verification failed." using submodules
    Populate .ssh folder automatically so that submodules accessing with ssh protocol can be retrieved without extra config
  • OneDev changed state to 'Closed' 6 years ago
    Previous Value Current Value
    Open
    Closed
  • OneDev changed state to 'Released' 6 years ago
    Previous Value Current Value
    Closed
    Released
issue 1/1
Type
Improvement
Priority
Normal
Assignee
Iterations
Issue Votes (0)
Watchers (2)
Reference
OD-140
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover