File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ jupyter nbextension enable --py githubcommit
2626## Steps
2727
2828* Install package using above commands
29- * Create Git repo where notebooks will be pushed if not already exists and clone it in home directory
30- * Clone this repo as well in home directory
29+ * Create Git repo where notebooks will be pushed if not already exists and clone it in your ` GIT_PARENT_DIR `
30+ * Clone this repo as well in your ` GIT_PARENT_DIR ` directory
3131* Replace the values in env.sh present in this repo itself
3232* Run the command - source ~ /githubcommit/env.sh
3333* Configure ssh key (present in ~ /.ssh/id_rsa.pub or specified location) in github account
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export GIT_REMOTE_UPSTREAM=$GIT_USER_UPSTREAM/$GIT_REPO_NAME
2323
2424
2525# ###################### Git Repo where notebooks will be pushed ############
26- cd ~ && git clone $GIT_REMOTE_URL_HTTPS
26+ cd $GIT_PARENT_DIR && git clone $GIT_REMOTE_URL_HTTPS
2727
2828
2929
3434
3535echo ' c.NotebookApp.disable_check_xsrf = True' >> ~ /.jupyter/jupyter_notebook_config.py
3636
37- cp ~ /githubcommit/config ~ /.ssh/config
37+ cp $GIT_PARENT_DIR /githubcommit/config ~ /.ssh/config
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ def put(self):
5454 # commit current notebook
5555 # client will sent pathname containing git directory; append to git directory's parent
5656 try :
57- print (repo .git .add (str (os .path . expanduser ( '~ ' ) + "/" + os .environ .get ('GIT_REPO_NAME' ) + filename )))
57+ print (repo .git .add (str (os .environ . get ( 'GIT_PARENT_DIR ' ) + "/" + os .environ .get ('GIT_REPO_NAME' ) + filename )))
5858 print (repo .git .commit ( a = True , m = "{}\n \n Updated {}" .format (msg , filename ) ))
5959 except GitCommandError as e :
6060 print (e )
You can’t perform that action at this time.
0 commit comments