GithubHelp home page GithubHelp logo

bitrise-steplib / steps-activate-ssh-key Goto Github PK

View Code? Open in Web Editor NEW
14.0 12.0 18.0 293 KB

Activates the given SSH key

License: MIT License

Go 100.00%
bitrise bitrise-step ci production-code hacktoberfest

steps-activate-ssh-key's Introduction

Activate SSH key (RSA private key)

Step changelog

Add your SSH key to the build machine to access private repositories

Description

This Step makes sure Bitrise has access to your repository when cloning SSH URLs. The Step saves the provided private key of your SSH keypair to a file and then loads it into the SSH agent.

Configuring the Step

By default, you do not have to change anything about the Step's configuration.

The step downloads the SSH key defined in your App Settings, so most of the time it's the only thing you need to configure (more info.

All you need to do is make sure that you registered your key pair on Bitrise and the public key at your Git provider. You can generate and register an SSH keypair in two ways.

  • Automatically during the app creation process.
  • Manually during the app creation process or at any other time. You generate your own SSH keys and register them on Bitrise and at your Git provider. The SSH key should not have a passphrase!

Note: if you configure to use HTTPS instead of SSH git access, you don't need to use this Step.

Troubleshooting

If the Step fails, check the public key registered to your Git repository and compare it to the public key registered on Bitrise. The most frequent issue is that someone deleted or revoked the key on your Git provider's website.

You can also set the Enable verbose logging input to true. This provides additional information in the log.

Useful links

Related Steps

๐Ÿงฉ Get started

Add this step directly to your workflow in the Bitrise Workflow Editor.

You can also run this step directly with Bitrise CLI.

โš™๏ธ Configuration

Inputs
Key Description Flags Default
ssh_rsa_private_key The private key of the SSH keypair in RSA format. sensitive $SSH_RSA_PRIVATE_KEY
ssh_key_save_path Path where the private key should be saved $HOME/.ssh/bitrise_step_activate_ssh_key
is_remove_other_identities When the step detects a running SSH agent and this input is true, it removes all loaded identities and restarts the agent before loading the configured key. When there is no running SSH agent, this input has no effect. Note: this only affects the in-memory SSH agent data, keys on disk are not touched. Options: * "true" * "false" true
verbose Enable verbose log option for better debug required false
Outputs
Environment Variable Description
SSH_AUTH_SOCK If the is_should_start_new_agent option is enabled, and no accessible ssh-agent is found, the step will start a new ssh-agent. This output contains the path of the socket created by ssh-agent, which can be used to access the started ssh-agent (learn more)

๐Ÿ™‹ Contributing

We welcome pull requests and issues against this repository.

For pull requests, work on your changes in a forked repository and use the Bitrise CLI to run step tests locally.

Note: this step's end-to-end tests (defined in e2e/bitrise.yml) are working with secrets which are intentionally not stored in this repo. External contributors won't be able to run those tests. Don't worry, if you open a PR with your contribution, we will help with running tests and make sure that they pass.

Learn more about developing steps:

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.