forked from sat28/githubcommit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
env.sh
37 lines (25 loc) · 1.36 KB
/
env.sh
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
####################### SSH KEY FOR GIT ###################################
eval `ssh-agent -s` && ssh-add -k
####################### To be added to git account settings ################
###################### GIT PARAMETERS #####################################
export GIT_PARENT_DIR=~
export GIT_REPO_NAME=#your-repo
export GIT_BRANCH_NAME=#your-branch
export GIT_USER=#your-gituser
export GIT_EMAIL=#your-email
export GITHUB_ACCESS_TOKEN=#access-token from github developer settings
export GIT_USER_UPSTREAM=#your-user
############################################################################
#### DO NOT EDIT BELOW THIS LINE: derived variables
############################################################################
export GIT_REMOTE_URL=git@github.com:$GIT_USER/$GIT_REPO_NAME.git
export GIT_REMOTE_URL_HTTPS=https://github.com/$GIT_USER/$GIT_REPO_NAME.git
export GIT_REMOTE_UPSTREAM=$GIT_USER_UPSTREAM/$GIT_REPO_NAME
####################### Git Repo where notebooks will be pushed ############
cd $GIT_PARENT_DIR && git clone $GIT_REMOTE_URL_HTTPS
####################### Change in jupyter config ###########################
if [ ! -f ~/.jupyter/jupyter_notebook_config.py ]; then
jupyter notebook --generate-config
fi
echo 'c.NotebookApp.disable_check_xsrf = True' >> ~/.jupyter/jupyter_notebook_config.py
cp $GIT_PARENT_DIR/githubcommit/config ~/.ssh/config