From 8f14f066821f0b9908cd577514f70535844e665a Mon Sep 17 00:00:00 2001 From: Graciela Gonzalez Date: Tue, 17 Jul 2018 10:53:24 -0500 Subject: [PATCH] Create set_git.sh --- set_git.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 set_git.sh diff --git a/set_git.sh b/set_git.sh new file mode 100644 index 0000000..8adc409 --- /dev/null +++ b/set_git.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# Make sure you have the latest version of the repo +echo +git pull +echo + +# Ask the user for login details +read -p 'Git repository url: ' upstreamVar +read -p 'Git Username: ' userVar +read -p 'Git email: ' emailVar + +echo +echo Thank you $userVar!, we now have your credentials +echo for upstream $upstreamVar. You must supply your password for each push. +echo + +echo setting up git + +git config --global user.name $userVar +git config --global user.email $emailVar +git remote set-url origin $upstreamVar +echo + +echo Please verify remote: +git remote -v +echo + +echo Please verify your credentials: +echo username: `git config user.name` +echo email: `git config user.email`