Closed laoshu133 closed 4 years ago
+1. Just ran into this same issue. It looks like a branch can be supplied as the next param, but the documentation doesn't say anything about that. It'd be great to see this fix applied, or the docs updated with the proper way to specify a ref hash.
In order to work around this, we ended up adding a pre-deploy hook which runs a git fetch --all
in order to be able to refer to the ref hash passed in the deploy command.
This problem is encountered when deploying with
pm2 deploy ref ref_hash
.git rev-parse --quiet --verify ${ref_hash}
does not check ifref_hash
really exists, it only checks if the format is valid.For example, the command can be executed under the current repo: