diff --git a/.markdownlint.yml b/.markdownlint.yml index 144bda4..2a0adfc 100644 --- a/.markdownlint.yml +++ b/.markdownlint.yml @@ -4,3 +4,4 @@ MD013: line_length: 255 MD024: siblings_only: true +MD026: false diff --git a/CHANGELOG.md b/CHANGELOG.md index 6455222..bc4e40c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [1.6.3] - 2020-01-27 + +### Others + +* add FAQ + ## [1.6.2] - 2020-01-25 ### Others @@ -65,7 +71,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. * First release. -[Unreleased]: https://github.com/shimataro/ssh-key-action/compare/v1.6.2...HEAD +[Unreleased]: https://github.com/shimataro/ssh-key-action/compare/v1.6.3...HEAD +[1.6.3]: https://github.com/shimataro/ssh-key-action/compare/v1.6.2...v1.6.3 [1.6.2]: https://github.com/shimataro/ssh-key-action/compare/v1.6.1...v1.6.2 [1.6.1]: https://github.com/shimataro/ssh-key-action/compare/v1.6.0...v1.6.1 [1.6.0]: https://github.com/shimataro/ssh-key-action/compare/v1.5.0...v1.6.0 diff --git a/README.md b/README.md index 01623f7..55fa515 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,49 @@ steps: run: scp ./foo/ target:bar/ ``` +## Q&A + +### SSH failed even though key has been installed. + +Check belows: + +* `Load key "/HOME/.ssh/id_rsa": invalid format`: + * OPENSSH format (key begins with `-----BEGIN OPENSSH PRIVATE KEY-----`) may not work. + * Use PEM format (begins with `-----BEGIN RSA PRIVATE KEY-----`). +* `Host key verification failed.`: + * Set `known-hosts` option or use `ssh -o StrictHostKeyChecking=no`. + * The former is **HIGHLY** recommended for security reason. + * I'm planning to make `known-hosts` required in v2. + +### How do I use encrypted SSH key? + +This action doesn't support encrypted key directly. +Here are some solutions: + +* decrypting key beforehand: best bet, and works on any VM +* `sshpass` command: next best bet, but not supported on Windows +* `expect` command: be careful not to expose passphrase to console +* `SSH_ASKPASS` environment variable: might be troublesome + +### Which one is the best way for transferring files, "direct SCP/SFTP/rsync" or "SCP/SFTP/rsync via bastion"? + +I recommend **rsync via bastion**. +It has some advantages over other methods: + +* "Rsync via bastion" doesn't require to update workflow files and `secrets` even if it is necessary to transfer files to multiple servers. + * Other methods require to update `known-hosts` if servers have changed. +* Rsync: + * is fastest of all. + * does **NOT** break files even if disconnected during transferring. + * can remove files that don't exist on server. +* SCP is [deprecated by OpenSSH](https://www.openssh.com/txt/release-8.0) due to outdated and inflexible protocol. +* Using bastion is more secure because: + * it is not necessarily to expose SSH port on servers to public. + * Address filtering is less effective. + * Because Azure address range is [very wide](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners#ip-addresses-of-github-hosted-runners). + * And will be updated continuously. + * if security incident ―e.g., private key leaked― occurs, it's OK just to remove `authorized_keys` on bastion. + ## License The scripts and documentation in this project are released under the [MIT License](LICENSE) diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn new file mode 120000 index 0000000..cf76760 --- /dev/null +++ b/node_modules/.bin/acorn @@ -0,0 +1 @@ +../acorn/bin/acorn \ No newline at end of file diff --git a/node_modules/.bin/eslint b/node_modules/.bin/eslint new file mode 120000 index 0000000..810e4bc --- /dev/null +++ b/node_modules/.bin/eslint @@ -0,0 +1 @@ +../eslint/bin/eslint.js \ No newline at end of file diff --git a/node_modules/.bin/esparse b/node_modules/.bin/esparse new file mode 120000 index 0000000..7423b18 --- /dev/null +++ b/node_modules/.bin/esparse @@ -0,0 +1 @@ +../esprima/bin/esparse.js \ No newline at end of file diff --git a/node_modules/.bin/esvalidate b/node_modules/.bin/esvalidate new file mode 120000 index 0000000..16069ef --- /dev/null +++ b/node_modules/.bin/esvalidate @@ -0,0 +1 @@ +../esprima/bin/esvalidate.js \ No newline at end of file diff --git a/node_modules/.bin/installed-package-contents b/node_modules/.bin/installed-package-contents new file mode 120000 index 0000000..4b296e7 --- /dev/null +++ b/node_modules/.bin/installed-package-contents @@ -0,0 +1 @@ +../@npmcli/installed-package-contents/index.js \ No newline at end of file diff --git a/node_modules/.bin/is-ci b/node_modules/.bin/is-ci new file mode 120000 index 0000000..fe6aca6 --- /dev/null +++ b/node_modules/.bin/is-ci @@ -0,0 +1 @@ +../is-ci/bin.js \ No newline at end of file diff --git a/node_modules/.bin/js-yaml b/node_modules/.bin/js-yaml new file mode 120000 index 0000000..9dbd010 --- /dev/null +++ b/node_modules/.bin/js-yaml @@ -0,0 +1 @@ +../js-yaml/bin/js-yaml.js \ No newline at end of file diff --git a/node_modules/.bin/json5 b/node_modules/.bin/json5 new file mode 120000 index 0000000..217f379 --- /dev/null +++ b/node_modules/.bin/json5 @@ -0,0 +1 @@ +../json5/lib/cli.js \ No newline at end of file diff --git a/node_modules/.bin/markdown-it b/node_modules/.bin/markdown-it new file mode 120000 index 0000000..894bcdb --- /dev/null +++ b/node_modules/.bin/markdown-it @@ -0,0 +1 @@ +../markdown-it/bin/markdown-it.js \ No newline at end of file diff --git a/node_modules/.bin/markdownlint b/node_modules/.bin/markdownlint new file mode 120000 index 0000000..f2b1093 --- /dev/null +++ b/node_modules/.bin/markdownlint @@ -0,0 +1 @@ +../markdownlint-cli/markdownlint.js \ No newline at end of file diff --git a/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp new file mode 120000 index 0000000..017896c --- /dev/null +++ b/node_modules/.bin/mkdirp @@ -0,0 +1 @@ +../mkdirp/bin/cmd.js \ No newline at end of file diff --git a/node_modules/.bin/ncu b/node_modules/.bin/ncu new file mode 120000 index 0000000..2bf26b2 --- /dev/null +++ b/node_modules/.bin/ncu @@ -0,0 +1 @@ +../npm-check-updates/bin/ncu \ No newline at end of file diff --git a/node_modules/.bin/npm-check-updates b/node_modules/.bin/npm-check-updates new file mode 120000 index 0000000..c180ad7 --- /dev/null +++ b/node_modules/.bin/npm-check-updates @@ -0,0 +1 @@ +../npm-check-updates/bin/npm-check-updates \ No newline at end of file diff --git a/node_modules/.bin/npm-packlist b/node_modules/.bin/npm-packlist new file mode 120000 index 0000000..b897e4a --- /dev/null +++ b/node_modules/.bin/npm-packlist @@ -0,0 +1 @@ +../npm-packlist/bin/index.js \ No newline at end of file diff --git a/node_modules/.bin/npm-run-all b/node_modules/.bin/npm-run-all new file mode 120000 index 0000000..0424f3c --- /dev/null +++ b/node_modules/.bin/npm-run-all @@ -0,0 +1 @@ +../npm-run-all/bin/npm-run-all/index.js \ No newline at end of file diff --git a/node_modules/.bin/pacote b/node_modules/.bin/pacote new file mode 120000 index 0000000..e595831 --- /dev/null +++ b/node_modules/.bin/pacote @@ -0,0 +1 @@ +../pacote/lib/bin.js \ No newline at end of file diff --git a/node_modules/.bin/pidtree b/node_modules/.bin/pidtree new file mode 120000 index 0000000..42c3f06 --- /dev/null +++ b/node_modules/.bin/pidtree @@ -0,0 +1 @@ +../pidtree/bin/pidtree.js \ No newline at end of file diff --git a/node_modules/.bin/rc b/node_modules/.bin/rc new file mode 120000 index 0000000..48b3cda --- /dev/null +++ b/node_modules/.bin/rc @@ -0,0 +1 @@ +../rc/cli.js \ No newline at end of file diff --git a/node_modules/.bin/rimraf b/node_modules/.bin/rimraf new file mode 120000 index 0000000..4cd49a4 --- /dev/null +++ b/node_modules/.bin/rimraf @@ -0,0 +1 @@ +../rimraf/bin.js \ No newline at end of file diff --git a/node_modules/.bin/run-p b/node_modules/.bin/run-p new file mode 120000 index 0000000..98a2c9c --- /dev/null +++ b/node_modules/.bin/run-p @@ -0,0 +1 @@ +../npm-run-all/bin/run-p/index.js \ No newline at end of file diff --git a/node_modules/.bin/run-s b/node_modules/.bin/run-s new file mode 120000 index 0000000..5938622 --- /dev/null +++ b/node_modules/.bin/run-s @@ -0,0 +1 @@ +../npm-run-all/bin/run-s/index.js \ No newline at end of file diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver new file mode 120000 index 0000000..5aaadf4 --- /dev/null +++ b/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/.bin/tsc b/node_modules/.bin/tsc new file mode 120000 index 0000000..0863208 --- /dev/null +++ b/node_modules/.bin/tsc @@ -0,0 +1 @@ +../typescript/bin/tsc \ No newline at end of file diff --git a/node_modules/.bin/tsserver b/node_modules/.bin/tsserver new file mode 120000 index 0000000..f8f8f1a --- /dev/null +++ b/node_modules/.bin/tsserver @@ -0,0 +1 @@ +../typescript/bin/tsserver \ No newline at end of file diff --git a/node_modules/.bin/which b/node_modules/.bin/which new file mode 120000 index 0000000..f62471c --- /dev/null +++ b/node_modules/.bin/which @@ -0,0 +1 @@ +../which/bin/which \ No newline at end of file diff --git a/node_modules/.bin/window-size b/node_modules/.bin/window-size new file mode 120000 index 0000000..e84c8ec --- /dev/null +++ b/node_modules/.bin/window-size @@ -0,0 +1 @@ +../window-size/cli.js \ No newline at end of file diff --git a/node_modules/.bin/yamllint b/node_modules/.bin/yamllint new file mode 120000 index 0000000..9cc8ed0 --- /dev/null +++ b/node_modules/.bin/yamllint @@ -0,0 +1 @@ +../yaml-lint/cli.js \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 8356a54..49b64c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "install-ssh-key", - "version": "1.6.2", + "version": "1.6.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 3c1bb95..8f20ff9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "install-ssh-key", - "version": "1.6.2", + "version": "1.6.3", "private": true, "description": "Install SSH key in .ssh", "main": "lib/main.js", diff --git a/scripts/create-release-branch.sh b/scripts/create-release-branch.sh index a736165..b1cffcf 100755 --- a/scripts/create-release-branch.sh +++ b/scripts/create-release-branch.sh @@ -119,12 +119,13 @@ function update_package_version() { } function update_dependencies_version() { + npm ci npm run check-updates -- -u } function regenerate_package_lock() { - rm -rf package-lock.json node_modules && - npm install + rm -rf package-lock.json node_modules + npm install } function build_package() { @@ -135,9 +136,9 @@ function build_package() { function commit_changes() { local VERSION=$1 - npm ci --only=production && - git add CHANGELOG.md package.json package-lock.json node_modules lib && - git commit -m "version ${VERSION}" + npm ci --only=production + git add CHANGELOG.md package.json package-lock.json node_modules lib + git commit -m "version ${VERSION}" } function finish() {