Drone

Custom clone with ssh

How to clone remote repository in drone with custom clone using ssh ?
Can I pass ssh key somehow into pipeline ?

BR,

documentation for custom clone logic:
https://docker-runner.docs.drone.io/configuration/cloning/

you can pass passwords or keys to a pipeline using secrets. the secret will be available as an environment variable, which you can write to a file
https://docs.drone.io/configure/secrets/repository/

environment:
  KEY:
    from_secret: ssh_key
commands:
- echo "$KEY" > $HOME/.ssh/id_rsa

You might also search this forum for examples. I recall there being similar discussion threads in the past.

1 Like

Thank you this helped
:smiley: