-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgit.bash
executable file
·36 lines (24 loc) · 916 Bytes
/
git.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
: '
This script takes two ENV GITHUB_USER & GITHUB_TOKEN
You can get a PAT from github -> settings -> developer settings -> Create Personal access token
'
git config --global user.name "Arnob kumar saha"
git config --global user.email [email protected]
ssh-keygen -t rsa -C "[email protected]"
ps -e | grep [s]sh-agent
ssh-add ~/.ssh/id_rsa
ssh-add -l
cat ~/.ssh/id_rsa.pub
echo "Now go to your github settings -> ssh page, & add this new one."
TEXT="done"
echo "Waiting for text: $TEXT"
while true; do
read -r line
echo "$line" | grep -q "$TEXT" && break
done
git config --global \
url."https://"$GITHUB_USER":"$GITHUB_TOKEN"@github.com".insteadOf \
"https://github.com"
go env -w GOPRIVATE='github.com/appscode/*,go.appscode.dev/*,kubedb.dev/*,github.com/ak8sdb/*,kubeops.dev/*,go.bytebuilders.dev/*,kubepack.dev/*,kubestash.dev/*,stash.appscode.dev/*'
bash repo-clone.bash