1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00
lazygit/test/hooks/pre-push
2018-12-18 21:27:39 +11:00

26 lines
521 B
Bash

#!/bin/bash
# test pre-push hook for testing the lazygit credentials view
#
# to enable, use:
# chmod +x .git/hooks/pre-push
#
# this will hang if you're using git from the command line, so only enable this
# when you are testing the credentials view in lazygit
exec < /dev/tty
echo -n "Username for 'github': "
read username
echo -n "Password for 'github': "
read password
if [ "$username" = "username" -a "$password" = "password" ]; then
echo "success"
exit 0
fi
>&2 echo "incorrect username/password"
exit 1