bedrock-deploy-to-wpengine
bedrock-deploy-to-wpengine copied to clipboard
Check if user has git access
Check if the current system has git push access to the WP Engine repo before branching and moving things. Otherwise, it leaves the user in a bad state on a new branch with files moved all around.
Here's a start
# Check if git push is setup
echo >&2 "[Verifying Git Push access. This may take a while...]"
ssh [email protected] info &> /dev/null
if [ "$?" -ne 1 ]; then
echo >&2 "[\033[31mERROR\e[0m] Git Push not configured\n Visit \033[32mhttps://wpengine.com/git/\e[0m to set this up, then try again after 10 minutes."
exit 1
fi