Skip to content

Commit d067bce

Browse files
committed
add script to set git remote and credentials
1 parent ba718d7 commit d067bce

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

‎set_git.sh‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
# Ask the user for login details
4+
read -p 'Git repository url: ' upstreamVar
5+
read -p 'Git Username: ' userVar
6+
read -p 'Git email: ' emailVar
7+
8+
echo
9+
echo Thankyou $userVar, we now have your credentials
10+
echo for upstream $upstreamVar. You must supply your password for each push.
11+
echo
12+
13+
echo setting up git
14+
15+
git config --global user.name $userVar
16+
git config --global user.email $emailVar
17+
git remote set-url origin $upstreamVar
18+
echo
19+
20+
echo Please verify remote:
21+
git remote -v
22+
echo
23+
24+
echo Please verify credentials:
25+
echo username: git config user.name
26+
echo email git config user.email

0 commit comments

Comments
 (0)