File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -191,20 +191,23 @@ configure_git() {
191191 echo " Enter your primary email for git:"
192192 read git_email
193193 git config --global user.email " $git_email "
194-
194+
195195 echo " Enter your name for git:"
196196 read git_name
197197 git config --global user.name " $git_name "
198-
199- echo " Generating SSH key for GitHub..."
200- ssh-keygen -t rsa -b 4096 -C " $git_email "
201- eval " $( ssh-agent -s) "
202- ssh-add ~ /.ssh/id_rsa
203-
198+
199+ if [[ ! -f ~ /.ssh/id_rsa ]]; then
200+ echo " Generating SSH key for GitHub..."
201+ ssh-keygen -t rsa -b 4096 -C " $git_email "
202+ eval " $( ssh-agent -s) "
203+ ssh-add ~ /.ssh/id_rsa
204+ fi
205+
204206 # Refer to Markdown Instructions
205207 echo " Copy your SSH key and add it to GitHub:"
206208 echo " cat ~/.ssh/id_rsa.pub"
207209}
210+
208211
209212# Validate networking
210213validate_network () {
You can’t perform that action at this time.
0 commit comments