This doc explains how to setup a development environment so you can get started
contributing
to Knative pkg
. Also take a look at:
- Create a GitHub account
- Setup GitHub access via SSH
- Install requirements
- Set up your shell environment
- Create and checkout a repo fork
Before submitting a PR, see also CONTRIBUTING.md.
You must install these tools:
go
: The language Knativepkg
is built ingit
: For source controldep
: For managing external dependencies.
To get started you'll need to set these environment variables (we recommend
adding them to your .bashrc
):
GOPATH
: If you don't have one, simply pick a directory and addexport GOPATH=...
$GOPATH/bin
onPATH
: This is so that tooling installed viago get
will work properly.
.bashrc
example:
export GOPATH="$HOME/go"
export PATH="${PATH}:${GOPATH}/bin"
The Go tools require that you clone the repository to the
src/github.com/knative/pkg
directory in your
GOPATH
.
To check out this repository:
- Create your own fork of this repo
- Clone it to your machine:
mkdir -p ${GOPATH}/src/github.com/knative
cd ${GOPATH}/src/github.com/knative
git clone git@github.com:${YOUR_GITHUB_USERNAME}/pkg.git
cd pkg
git remote add upstream git@github.com:knative/pkg.git
git remote set-url --push upstream no_push
Adding the upstream
remote sets you up nicely for regularly
syncing your fork.
Once you reach this point you are ready to do a full build and deploy as described below.