-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathstep.yml
104 lines (80 loc) · 4.07 KB
/
step.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
title: Activate SSH key (RSA private key)
summary: 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](https://devcenter.bitrise.io/en/connectivity/configuring-ssh-keys).
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](https://devcenter.bitrise.io/getting-started/adding-a-new-app/#setting-up-ssh-keys).
- Manually during the app creation process or at any other time. You [generate your own SSH keys](https://devcenter.bitrise.io/faq/how-to-generate-ssh-keypair/) 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
- [Setting up SSH keys](https://devcenter.bitrise.io/getting-started/adding-a-new-app/#setting-up-ssh-keys)
- [How can I generate an SSH key pair?](https://devcenter.bitrise.io/faq/how-to-generate-ssh-keypair/)
### Related Steps
- [Git Clone Repository](https://www.bitrise.io/integrations/steps/git-clone)
website: https://github.com/bitrise-steplib/steps-activate-ssh-key
source_code_url: https://github.com/bitrise-steplib/steps-activate-ssh-key
support_url: https://github.com/bitrise-steplib/steps-activate-ssh-key/issues
type_tags:
- access-control
is_always_run: false
is_skippable: false
deps:
apt_get:
- name: expect
- name: git
run_if: .IsCI
toolkit:
go:
package_name: github.com/bitrise-steplib/steps-activate-ssh-key
inputs:
- ssh_rsa_private_key: $SSH_RSA_PRIVATE_KEY
opts:
title: SSH private key content
description: |-
The private key of the SSH keypair in RSA format.
is_expand: true
is_dont_change_value: true
is_sensitive: true
- ssh_key_save_path: $HOME/.ssh/bitrise_step_activate_ssh_key
opts:
title: SSH key save path
description: Path where the private key should be saved
is_expand: true
is_dont_change_value: true
- is_remove_other_identities: "true"
opts:
title: Remove other identities from SSH agent
description: |-
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"
is_expand: false
value_options:
- "true"
- "false"
- verbose: "false"
opts:
title: Enable verbose logging
summary: Enable verbose log option for better debug
description: Enable verbose log option for better debug
is_expand: true
is_required: true
value_options:
- "true"
- "false"
outputs:
- SSH_AUTH_SOCK:
opts:
title: SSH agent socket path
description: |-
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](https://www.man7.org/linux/man-pages/man1/ssh-agent.1.html))