## tk create source git Create or update a git source ### Synopsis The create source command generates a GitRepository resource and waits for it to sync. For Git over SSH, host and SSH keys are automatically generated and stored in a Kubernetes secret. For private Git repositories, the basic authentication credentials are stored in a Kubernetes secret. ``` tk create source git [name] [flags] ``` ### Examples ``` # Create a source from a public Git repository master branch create source git podinfo \ --url=https://github.com/stefanprodan/podinfo \ --branch=master # Create a source from a Git repository pinned to specific git tag create source git podinfo \ --url=https://github.com/stefanprodan/podinfo \ --tag="3.2.3" # Create a source from a public Git repository tag that matches a semver range create source git podinfo \ --url=https://github.com/stefanprodan/podinfo \ --tag-semver=">=3.2.0 <3.3.0" # Create a source from a Git repository using SSH authentication create source git podinfo \ --url=ssh://git@github.com/stefanprodan/podinfo \ --branch=master # Create a source from a Git repository using basic authentication create source git podinfo \ --url=https://github.com/stefanprodan/podinfo \ --username=username \ --password=password ``` ### Options ``` --branch string git branch (default "master") -h, --help help for git -p, --password string basic authentication password --tag string git tag --tag-semver string git tag semver range --url string git address, e.g. ssh://git@host/org/repository -u, --username string basic authentication username ``` ### Options inherited from parent commands ``` --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller]) --interval duration source sync interval (default 1m0s) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) --verbose print generated objects ``` ### SEE ALSO * [tk create source](tk_create_source.md) - Create source commands ###### Auto generated by spf13/cobra on 1-May-2020