Authentication
SSH Authentication
SSH Authentication Support Key And Password
- set key config in deploy.json
- keyfile
- keyfilepass is an optional parameter that you can use when configuring SSH keys. It is used when your SSH key is password-protected.
SSH Password Authentication
- user
- password
SCM Authentication
Scm Authentication By Deploy Key
- How to set Deploy Key
- Github
- Settings -> Deploy keys -> Add deploy key
- Gitlab
- gitlab -> Deploy Keys -> Key: Input Deploy Pubkey
- For the second deployment and other projects, you can enable the use of a shared deploy key.
- set config in deploy.json
- scm_keyfile
- scm_keyfilepass Optional
SCM Password Authentication
- set scm user password in deploy.json
- scm_username
- scm_password
SSH KEY && SCM KEY
- The default SSH key and SCM key are the same.
- If the SCM key is different, you need to set the
scm_keyfile
separately.
- If you need to create a separate deploy SCM key for your project, you can use
ssh-keygen
to generate a separate SSH key (be careful not to overwrite your existing user SSH key by mistake).
-
You can set different keys for specific hosts by adding the following configuration to your .ssh/config
file:
Host git.xxx.com
HostName git.xxx.com
IdentitiesOnly yes
IdentityFile ~/.ssh/id_rsa_xxx
- Set the permissions of the configuration file using
chmod 600 ~/.ssh/config
.