2020-02-21 14:21:07 +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 ](https://golang.org/cmd/go/#hdr-Remote_import_paths )
2021-06-22 05:04:10 +00:00
`git-import` strives to work similarly
2020-02-21 14:21:07 +00:00
By providing a `meta` tag with appropriate information, `git-import` will clone the specified repository
2021-06-22 05:04:10 +00:00
The following is the `meta` tag for this repository, hosted on https://go.jolheiser.com/git-import with [Vanity ](https://git.jojodev.com/jolheiser/vanity )
2020-02-21 14:21:07 +00:00
```html
2021-06-22 05:04:10 +00:00
< meta name = "git-import" content = "git-import https://git.jojodev.com/jolheiser/git-import.git git@git.jojodev.com:jolheiser/git-import.git" / >
2020-02-21 14:21:07 +00:00
```
2021-06-22 05:04:10 +00:00
## Installation (Git extension)
To install the Git extension:
`go install go.jolheiser.com/git-import/cmd/git-get`
2020-02-21 14:21:07 +00:00
## SSH
2021-06-22 05:04:10 +00:00
`git-get` can set up SSH if applicable, however it must be run with `GIT_SSH_COMMAND` set in order to configure the repository properly.
2020-02-21 14:21:07 +00:00
## Examples
Clone this repository
2021-06-22 05:04:10 +00:00
`git get go.jolheiser.com/git-import`
2020-02-21 14:21:07 +00:00
Clone this repository with SSH
2021-06-22 05:04:10 +00:00
`GIT_SSH_COMMAND="/usr/bin/ssh -i /home/user/.ssh/id_rsa" git-import -ssh go.jolheiser.com/git-import`
2020-02-21 14:21:07 +00:00
Clone this repository, but clone into "import-git"
2021-06-22 05:04:10 +00:00
`git get -out import-git go.jolheiser.com/git-import`
2020-02-21 14:21:07 +00:00
Output the repository URL of this repo (without cloning)
2021-06-22 05:04:10 +00:00
`git get -display go.jolheiser.com/git-import`
2020-02-21 14:21:07 +00:00
Output the repository SSH URL of this repo (without cloning)
2021-06-22 05:04:10 +00:00
`git get -display -ssh go.jolheiser.com/git-import`