mirror of
https://github.com/appleboy/drone-ssh.git
synced 2025-05-09 18:23:21 +08:00
docs: add passphrase example
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
6b488f1203
commit
a046be092b
23
DOCS.md
23
DOCS.md
@ -139,6 +139,23 @@ Example configuration for stoping script after first failure:
|
|||||||
- echo "you can't see the steps."
|
- echo "you can't see the steps."
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Example configuration for passphrase which protecting a private key:
|
||||||
|
|
||||||
|
```diff
|
||||||
|
- name: ssh commands
|
||||||
|
image: appleboy/drone-ssh
|
||||||
|
settings:
|
||||||
|
host: foo.com
|
||||||
|
username: root
|
||||||
|
+ key:
|
||||||
|
+ from_secret: ssh_key
|
||||||
|
+ passphrase: 1234
|
||||||
|
port: 22
|
||||||
|
script:
|
||||||
|
- mkdir abc/def/efg
|
||||||
|
- echo "you can't see the steps."
|
||||||
|
```
|
||||||
|
|
||||||
## Secret Reference
|
## Secret Reference
|
||||||
|
|
||||||
ssh_username
|
ssh_username
|
||||||
@ -147,6 +164,9 @@ ssh_username
|
|||||||
ssh_password
|
ssh_password
|
||||||
: password for target host user
|
: password for target host user
|
||||||
|
|
||||||
|
ssh_passphrase
|
||||||
|
: The purpose of the passphrase is usually to encrypt the private key.
|
||||||
|
|
||||||
ssh_key
|
ssh_key
|
||||||
: plain text of user private key
|
: plain text of user private key
|
||||||
|
|
||||||
@ -156,6 +176,9 @@ proxy_ssh_username
|
|||||||
proxy_ssh_password
|
proxy_ssh_password
|
||||||
: password for user of proxy server
|
: password for user of proxy server
|
||||||
|
|
||||||
|
proxy_ssh_passphrase
|
||||||
|
: The purpose of the passphrase is usually to encrypt the private key.
|
||||||
|
|
||||||
proxy_ssh_key
|
proxy_ssh_key
|
||||||
: plain text of user private key for proxy server
|
: plain text of user private key for proxy server
|
||||||
|
|
||||||
|
4
main.go
4
main.go
@ -40,7 +40,7 @@ func main() {
|
|||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "ssh-passphrase",
|
Name: "ssh-passphrase",
|
||||||
Usage: "ssh passphrase",
|
Usage: "The purpose of the passphrase is usually to encrypt the private key.",
|
||||||
EnvVar: "PLUGIN_SSH_PASSPHRASE,PLUGIN_PASSPHRASE,SSH_PASSPHRASE,PASSPHRASE,INPUT_PASSPHRASE",
|
EnvVar: "PLUGIN_SSH_PASSPHRASE,PLUGIN_PASSPHRASE,SSH_PASSPHRASE,PASSPHRASE,INPUT_PASSPHRASE",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
@ -109,7 +109,7 @@ func main() {
|
|||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "proxy.ssh-passphrase",
|
Name: "proxy.ssh-passphrase",
|
||||||
Usage: "proxy ssh passphrase",
|
Usage: "The purpose of the passphrase is usually to encrypt the private key.",
|
||||||
EnvVar: "PLUGIN_PROXY_SSH_PASSPHRASE,PLUGIN_PROXY_PASSPHRASE,PROXY_SSH_PASSPHRASE,PROXY_PASSPHRASE,INPUT_PROXY_PASSPHRASE",
|
EnvVar: "PLUGIN_PROXY_SSH_PASSPHRASE,PLUGIN_PROXY_PASSPHRASE,PROXY_SSH_PASSPHRASE,PROXY_PASSPHRASE,INPUT_PROXY_PASSPHRASE",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
|
Loading…
Reference in New Issue
Block a user