-
The repository will be created at /home/user/Projects/ directory (Instead of user add name of user directory)
-
The github personal access token is to be obtained from the developer settings in github.com and to be stored in .env file in the home folder in json format.
-
Token to be named 'github-auth-token' or change it in the python code
-
To use command universally make a soft link using ln in /usr/bin/
sudo ln git_util.py /usr/bin/git_util.py
sudo ln create_repo.sh /usr/bin/create_repo
You can also copy and paste the files there
--> If the user is not getting authenticated in the get_user() function after using the personal access token to authenticate add the following to to repr to the AuthenticatedUser class in AuthenticatedUser.py in the locale site file for PyGithub.
path:/home/rahul/.local/lib/python3.8/site-packages/github/AuthenticatedUser.py:
replace 'rahul' with name of your user folder.
class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
def __repr__(self):
self._completeIfNotSet(self._login) #Add this line
return self.get__repr__({"login": self._login.value})