[Python] Running Git clone command in Python

Discussão em 'Python' iniciado por Stack, Fevereiro 28, 2025.

  1. Stack

    Stack Membro Participativo

    I am new to both Python and Git. I am in the process of writing a Python script which needs to do the same action as done by running the below git command from my workspace on a Linux server (i.e., /local/mnt/workspace/<username>).

    git clone git://git.xyz.com/platform/manifest.git -b jb_2.5


    I tried using the Fab library, however module fabric.api isn't installed so I couldn't proceed. Also,

    import git
    git.Git().clone("git://git.xyz.com/platform/manifest.git")


    didn't work.

    Are there any other solutions to do this?

    Continue reading...

Compartilhe esta Página