bedrock-deploy-to-wpengine icon indicating copy to clipboard operation
bedrock-deploy-to-wpengine copied to clipboard

Check if user has git access

Open hello-jason opened this issue 9 years ago • 1 comments

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.

hello-jason avatar Dec 30 '15 16:12 hello-jason

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

hello-jason avatar Jan 08 '17 18:01 hello-jason