-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathgit.bash
More file actions
executable file
·39 lines (29 loc) · 1.06 KB
/
Copy pathgit.bash
File metadata and controls
executable file
·39 lines (29 loc) · 1.06 KB
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
36
37
38
#!/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 arnob@appscode.com
ssh-keygen -t rsa -C "arnob@appscode.com"
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
# PAT
echo "Also Go to Developer settings page; Get a PAT token; Paste it in the promt & Enter"
read -r line
export GITHUB_USER=arnobkumarsaha
export GITHUB_TOKEN="$line"
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