Skip to content

Instantly share code, notes, and snippets.

@munir131
Created September 7, 2017 04:33
Show Gist options
  • Save munir131/557375a6bca1bc1cf0bb5b3f0d2a40d2 to your computer and use it in GitHub Desktop.
Save munir131/557375a6bca1bc1cf0bb5b3f0d2a40d2 to your computer and use it in GitHub Desktop.
masquerade User
if [ $1 = 'Munir' ]
then
rm -f /home/munir/.ssh/id_rsa*
cp /home/munir/.ssh-Munir/id_rsa* /home/munir/.ssh/
git config --global user.name "Munir Khakhi"
git config --global user.email email@email.com
elif [ $1 = 'User' ]
then
rm -rf /home/munir/.ssh/id_rsa*
cp /home/munir/.ssh-User/id_rsa* /home/munir/.ssh/
git config --global user.name "User"
git config --global user.email user@email.com
else
echo "Invalid User"
fi
ssh-add ~/.ssh/id_rsa
git config --list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment