Skip to main content

a wrapper of git command

Project description


PyPI Version PyPI Monthly downloads Build Status Wheel Status Coverage report


gitcmd is a wrapper of ‘git’ command , it can interact with git command where need username and password.


The quick way:

pip install gitcmd


Clone git respositroy

from gitcmd import GitCmd
clone_to = 'mydir'
url = ""
ge = GitCmd(work_dir=clone_to, url=url)

if you clone with ssh, you may need config ssh key at first.

Clone gitlab with username,password

from gitcmd import GitCmd
import os
ge = GitCmd(work_dir="clone_to_where", url="", user="user",pwd="pwd")

# work dir should be either empty or not exists

# after repository was cloned to local , you can execute other commands
ge.execute("git diff ...")

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitcmd-1.1.1.tar.gz (3.5 kB view hashes)

Uploaded source

Built Distribution

gitcmd-1.1.1-py2.py3-none-any.whl (4.9 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page