Skip to content
/ tigwen Public

A utility for creating new golang github repositories.

License

Notifications You must be signed in to change notification settings

mlctrez/tigwen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 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 go-git/go-git#411 for information on how to configure known_hosts to work correctly with the go-git / go ssh implementation

About

A utility for creating new golang github repositories.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages