This release is a pre-release and may not be stable for production use.
sshgit
Git remote operations (clone, fetch, pull, push) over SSH. Built on dulwich and paramiko.
Installation
pip install sshgit
Usage
sshgit clone <remote-path> [dest]
Clone a remote repository over SSH.
sshgit clone /home/me/project.git --host devbox --username me
sshgit clone /srv/repos/app.git --host 10.0.1.5 --port 2222 --ed25519-key ~/.ssh/id_ed25519
sshgit clone /home/me/repo.git ./local-repo --host myserver --username deploy --password
sshgit clone /opt/repos/lib.git --host bastion --rsa-key ~/.ssh/id_rsa --branch main
| Flag | Description |
|---|---|
--host HOST |
Remote hostname or IP (required) |
--username USER |
SSH username (required) |
--port PORT |
SSH port (default: 22) |
--password PASS |
SSH password |
--ed25519-key PATH |
Path to Ed25519 private key |
--rsa-key PATH |
Path to RSA private key |
--branch NAME |
Branch to check out (default: remote HEAD) |
sshgit fetch [refspec]
Fetch objects and refs from the remote. Reads connection details from .git/config.
sshgit fetch
sshgit fetch main
sshgit fetch --prune
| Flag | Description |
|---|---|
--prune |
Remove stale remote-tracking refs |
sshgit pull [branch]
Fetch and fast-forward the current branch. Refuses if the branch has diverged.
sshgit pull
sshgit pull main
sshgit push [refspec]
Push local commits to the remote.
sshgit push
sshgit push main
sshgit push --force
sshgit push --tags
| Flag | Description |
|---|---|
--force |
Allow non-fast-forward updates |
--tags |
Push all tags |
Authentication
One of --ed25519-key, --rsa-key, or --password is required on every invocation. No implicit agent or config file lookup.
| Flag | Description |
|---|---|
--ed25519-key PATH |
Path to Ed25519 private key |
--rsa-key PATH |
Path to RSA private key |
--password PASS |
SSH password |
Jump Host (Proxy)
All commands accept these optional flags for connecting through a bastion host:
| Flag | Description |
|---|---|
--proxy-host HOST |
Jump host hostname or IP |
--proxy-port PORT |
Jump host SSH port (default: 22) |
--proxy-username USER |
Jump host username (defaults to target username) |
--proxy-ed25519-key PATH |
Ed25519 key for jump host |
--proxy-rsa-key PATH |
RSA key for jump host |
--proxy-password PASS |
Jump host password |
Contributing
Contributions are welcome! Please submit pull requests or open issues on the GitHub repository.
License
This project is licensed under the MIT License.
Release files for sshgit 0.1.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sshgit-0.1.0a1.tar.gz | 9.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sshgit-0.1.0a1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 19.4 kB
Release files / sshgit-0.1.0a1.tar.gz
| Download URL | sshgit-0.1.0a1.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a4246659264130a345014d134df12eefe7586026368a9d4b80a7efd7c1ed1ac
|
|
BLAKE2b-256 checksum How to use checksums |
554d76fa4dd4067db0d96d0df952fc90bfd734cb2253d02ad3c568191a4ac10a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Release files / sshgit-0.1.0a1-py2.py3-none-any.whl
| Download URL | sshgit-0.1.0a1-py2.py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a1e68293e7a0f697a895ae787679380ce54aec86d89d078d2b1116a452b69383
|
|
BLAKE2b-256 checksum How to use checksums |
76595579a7d022247a69ecf4ef92ce8063120adae7bce59a7bf3e24a6f66ad01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|