docker-nifi-registry icon indicating copy to clipboard operation
docker-nifi-registry copied to clipboard

Error cloning repository with default `FLOW_PROVIDER_GIT_REMOTE_TO_PUSH` as blank

Open nononsensetekkie opened this issue 4 years ago • 0 comments

The documentation indicates that FLOW_PROVIDER_GIT_REMOTE_TO_PUSH is default to empty. This is a valid use-case in production deployment when wanting to access the read-only Git repository as the GitFlowPersistenceProvider.

Current implementation throws an error when setting FLOW_PROVIDER_GIT_REMOTE_TO_PUSH to blank due to the git clone command explicitly specifying the --origin or -o flag.

nifi-registry_1  | git clone -o $FLOW_PROVIDER_GIT_REMOTE_TO_PUSH -b $GIT_CHECKOUT_BRANCH $GIT_REMOTE_URL $FLOW_PROVIDER_GIT_FLOW_STORAGE_DIRECTORY


nifi-registry_1  | fatal: Too many arguments.
nifi-registry_1  |
nifi-registry_1  | usage: git clone [<options>] [--] <repo> [<dir>]
nifi-registry_1  |     -o, --origin <name>   use <name> instead of 'origin' to track upstream

It may be necessary to check for empty FLOW_PROVIDER_GIT_REMOTE_TO_PUSH and exclude the entire option for -o $FLOW_PROVIDER_GIT_REMOTE_TO_PUSH from the git clone command.

nononsensetekkie avatar Apr 06 '21 14:04 nononsensetekkie