https://github.com/dependabot/git-shim
git https shim
https://github.com/dependabot/git-shim
Last synced: 9 months ago
JSON representation
git https shim
- Host: GitHub
- URL: https://github.com/dependabot/git-shim
- Owner: dependabot
- Created: 2022-06-25T21:45:09.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-16T16:30:49.000Z (over 1 year ago)
- Last Synced: 2025-04-12T02:38:31.347Z (9 months ago)
- Language: Go
- Size: 45.9 KB
- Stars: 22
- Watchers: 7
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# git https shim
This git shim replaces any URL or SCP-style URL as an argument to git with an HTTPS URL.
This is useful in a corporate environment where an HTTP Proxy is used. You could use the command `git config --global url."https://".insteadOf git://` but that doesn't work for SCP-style style URLs: `git@github.com:org/repo.git` due to the colon `:`.
How does it work? You place this git shim on your path before the actual git. When it runs, it finds arguments and replaces them, and then invokes the next git on the path with the scrubbed arguments.
## Installation
### Prebuilt
- Go to the latest [Release](https://github.com/dependabot/git/releases)
- Download the binary for your device
- Unarchive and place the binary somewhere accessable like `~/bin`
- Edit your PATH environment variable to place `~/bin` before where `git` is installed, like `PATH=$HOME/bin:/usr/bin`.
- Restart your terminal
### From Source
With Go installed, ensure Go's bin path is on the $PATH environment variable before `git` and run:
```
go install github.com/dependabot/git@latest
```
You may need to restart your terminal, or `source` on your .*rc/profile.