Search code examples
pythongitdulwich

dulwich - clone from remote repo authentication


I couldn't find any resource on this topic. I need to clone from a private repository by providing the username and the password. However when they are provided as keyword arguments to 'dulwich.get-client-from-path()' an error occurs saying 'unknown argument "username"'.

This seems to be a simple thing to do, however I can't find the proper method.


Solution

  • Try this snippet:

    porcelain.clone("https://user:password@your_git_repo.git")