https://github.com/mlctrez/tigwen
A utility for creating new golang github repositories.
https://github.com/mlctrez/tigwen
Last synced: 5 months ago
JSON representation
A utility for creating new golang github repositories.
- Host: GitHub
- URL: https://github.com/mlctrez/tigwen
- Owner: mlctrez
- License: apache-2.0
- Created: 2016-06-24T20:59:02.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-03-15T22:24:09.000Z (over 2 years ago)
- Last Synced: 2025-10-10T03:56:35.525Z (9 months ago)
- Language: Go
- Homepage:
- Size: 26.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tigwen
A utility for creating new golang github repositories. It should be executed in the top level of the source tree.
If `go.mod` exists it will be used to derive the github user and repository name.
```
# go module example - $SOMEPATH is outside of GOPATH
mkdir -p $SOMEPATH/github.com/username/module
cd $SOMEPATH/github.com/username/module
go mod init github.com/username/module
tigwen
```
If `go.mod` does *not* exist in the current directory, then the user and repository are derived
from the parent directories.
```
# gopath example
mkdir -p $GOPATH/src/github.com/username/module
cd $GOPATH/src/github.com/username/module
tigwen
```
The path `~/.github_token` must be a one line file containing a [github token](https://github.com/settings/tokens) that
has repo create permissions.
* The token must have the prefix `ghp_` which is the default for any recently created tokens.
### Steps that are executed
* A new remote repository is created at github.com/username/module
* A git repository is initialized in the current directory
* The files `README.md`, `LICENSE`, and `.gitignore` are added and committed
* The remote origin is set and the initial commit is pushed
### Assumptions
* Your ssh configuration either:
* Has a `Host github.com` entry and IdentityFile to use for github.com
* Does not have this entry, `~/.ssh/id_rsa` will be used for authentication.
* Your known_hosts file has host keys for github.com
* See https://github.com/go-git/go-git/issues/411 for information on how to configure known_hosts to work correctly
with the go-git / go ssh implementation