Skip to main content

Allows running custom commands on a git remote.

Project description

This package defines a git-remote-run command, which allows running custom commands on a git remote.

This can be used, for example, to set up the actual remote repository, as in:

$ git remote add remote-repo user@server:path/to/repo
$ git remote-run remote-repo -c '
    mkdir -p $REPO_DIR
    git init --bare $REPO_DIR
    echo echo it works! > $REPO_DIR/hooks/update
    chmod +x $REPO_DIR/hooks/update'
Initialized empty Git repository in /home/user/path/to/repo/
$ git push remote-repo master
...
remote: it works!

See git remote-run -h for more options.

How does it work?

git-remote-run doesn’t attempt any parsing of the git remote URL on its own, nor does it make assumptions about the transport used. Instead, it relies on git’s built-in ability to run commands on the remote side.

Git uses this ability in its git archive –remote=… command, to create an archive of a remote repository. We abuse this ability a little bit by sending a custom script to run as the –exec parameter.

Author

Radek Czajka

License

This project is licensed under the MIT License – see the LICENSE file for details.

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

git-remote-run-1.2.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_remote_run-1.2-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file git-remote-run-1.2.tar.gz.

File metadata

  • Download URL: git-remote-run-1.2.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.5

File hashes

Hashes for git-remote-run-1.2.tar.gz
Algorithm Hash digest
SHA256 ef8c9f231a9c4fe96d843192002db28e85caa42ef402da92c6405a1329ef73cc
MD5 75b0c210e2116457b97f1ec1d8c5086a
BLAKE2b-256 9b8a54888a8ab466b593bf3a24921a151cb0378ac009435d8c704f1d4886f5dd

See more details on using hashes here.

File details

Details for the file git_remote_run-1.2-py3-none-any.whl.

File metadata

  • Download URL: git_remote_run-1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.5

File hashes

Hashes for git_remote_run-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 59ac1537549524893a3cdbcfbfd6bc9be7e933fc11d51f9289b24ba1dd274492
MD5 f3a43c9fc74a4b2b0a676f550ae39b5b
BLAKE2b-256 7f38724dbf0dc9241a64c14e06a0f96a504e4fea66ac08fc24d7ca7db9561510

See more details on using hashes here.

Supported by

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