I have a shell script that pulls my repository from git. Normally, it receives the credentials and the pull works just fine.
My question is what happens if the credentials are wrong and I get an authentication failure. How can I catch this error and stop the shell script?