I am trying to pull filesfrom git using python but it's not working. Below is the code I was using:
import git
git.cmd.Git().pull('https://github.com/User/repo','master')
it asks for authentication and after that terminates.
Could someone please help me here? what's wrong with this code?
The first step is to create a
git.Repoobject to represent your repository.In the above example, the directory
self.rorepo.working_tree_direquals/Users/mtrier/Development/git-pythonand is my working repository which contains the.gitdirectory. You can also initializeGitPythonwith a bare repository.This is what you asked for :