Cloning a private repo using HTTPS with gitpython

后端 未结 1 1997
清歌不尽
清歌不尽 2021-01-13 00:55

I am using gitpython to clone a git repository over HTTPS. If the project is a private repo, it will prompt for username and password. How do I interact with the prompt pyth

相关标签:
1条回答
  • 2021-01-13 01:14

    it works for me when using github access token instead of username and password where 2FA may be required:

    HTTPS_REMOTE_URL = 'https://<access_token>:x-oauth-basic@github.com/username/private-project'

    0 讨论(0)
提交回复
热议问题