This repository has been archived on 2021-06-22. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
John Olheiser 3c1a19d31c Update query parameter and make HTTPS by default (#4)
Resolves #2
Resolves #3

Co-authored-by: jolheiser <john.olheiser@gmail.com>
Reviewed-on: #4
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-committed-by: John Olheiser <john.olheiser@gmail.com>
2021-02-22 04:22:34 +08:00
.gitignore Initial commit 2020-02-21 08:21:07 -06:00
go.mod QoL (#1) 2020-09-12 19:53:28 +00:00
go.sum QoL (#1) 2020-09-12 19:53:28 +00:00
main_test.go QoL (#1) 2020-09-12 19:53:28 +00:00
main.go Update query parameter and make HTTPS by default (#4) 2021-02-22 04:22:34 +08:00
Makefile QoL (#1) 2020-09-12 19:53:28 +00:00
parse.go QoL (#1) 2020-09-12 19:53:28 +00:00
README.md Clarify git alias 2020-02-21 14:24:42 +00:00

git-import

Similar to go-import, a way to create vanity URLs for git repository paths.

Information on go-import can be found on the golang website

git-import strives to work in a similar manner
By providing a meta tag with appropriate information, git-import will clone the specified repository

The following is the meta tag for this repository, hosted on https://go.jolheiser.com/git-import with Vanity

<meta name="git-import" content="git-import https://gitea.com/jolheiser/git-import.git git@gitea.com:jolheiser/git-import.git" />

SSH

git-import can set up SSH if applicable, however it must be ran with GIT_SSH_COMMAND set in order to configure the repository properly.

Examples

Clone this repository
git-import go.jolheiser.com/git-import

Clone this repository with SSH
GIT_SSH_COMMAND="/usr/bin/ssh -i /home/user/.ssh/id_rsa" git-import -s go.jolheiser.com/git-import

Clone this repository, but clone into "import-git"
git-import go.jolheiser.com/git-import import-git

Output the repository URL of this repo (without cloning)
git-import -d go.jolheiser.com/git-import

Output the repository SSH URL of this repo (without cloning)
git-import -d -s go.jolheiser.com/git-import

Bonus Points

Create a git alias for git-import

git config --global alias.get '!/path/to/git-import'

and use like git get go.jolheiser.com/git-import