0

I have tried to create a repository in github with my python program. I found gitpython package in web-search. I can able to pull repository but unable to create a repository in github. please help me.

anjaneyulubatta505
  • 10,713
  • 1
  • 52
  • 62

1 Answers1

1

Git and GitHub are different things.

The former is an open source distributed version control system. The latter is a commercial entity that provides products and services supportng Git. (Confusingly, it is also the name of many of those products.)

There is no way to create a repository on GitHub using the standard git command-line tool.

From GitPython's PyPI page:

GitPython is a python library used to interact with Git repositories.

No mention is made of GitHub, and in general git and GitPython can do basically the same things. If you want to create a repository on GitHub you could use any of the libraries listed here.

Alternatively, you could use their API directly, by POSTing to /user/repos. This method will require you to authenticate, and in my opinion using one of the libraries from the previous list is easier and more robust.

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257