|
|
@ -46,35 +46,35 @@ The create source git command generates a GitRepository resource and waits for i
|
|
|
|
For Git over SSH, host and SSH keys are automatically generated and stored in a Kubernetes secret.
|
|
|
|
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.`,
|
|
|
|
For private Git repositories, the basic authentication credentials are stored in a Kubernetes secret.`,
|
|
|
|
Example: ` # Create a source from a public Git repository master branch
|
|
|
|
Example: ` # Create a source from a public Git repository master branch
|
|
|
|
create source git podinfo \
|
|
|
|
tk create source git podinfo \
|
|
|
|
--url=https://github.com/stefanprodan/podinfo \
|
|
|
|
--url=https://github.com/stefanprodan/podinfo \
|
|
|
|
--branch=master
|
|
|
|
--branch=master
|
|
|
|
|
|
|
|
|
|
|
|
# Create a source from a Git repository pinned to specific git tag
|
|
|
|
# Create a source from a Git repository pinned to specific git tag
|
|
|
|
create source git podinfo \
|
|
|
|
tk create source git podinfo \
|
|
|
|
--url=https://github.com/stefanprodan/podinfo \
|
|
|
|
--url=https://github.com/stefanprodan/podinfo \
|
|
|
|
--tag="3.2.3"
|
|
|
|
--tag="3.2.3"
|
|
|
|
|
|
|
|
|
|
|
|
# Create a source from a public Git repository tag that matches a semver range
|
|
|
|
# Create a source from a public Git repository tag that matches a semver range
|
|
|
|
create source git podinfo \
|
|
|
|
tk create source git podinfo \
|
|
|
|
--url=https://github.com/stefanprodan/podinfo \
|
|
|
|
--url=https://github.com/stefanprodan/podinfo \
|
|
|
|
--tag-semver=">=3.2.0 <3.3.0"
|
|
|
|
--tag-semver=">=3.2.0 <3.3.0"
|
|
|
|
|
|
|
|
|
|
|
|
# Create a source from a Git repository using SSH authentication
|
|
|
|
# Create a source from a Git repository using SSH authentication
|
|
|
|
create source git podinfo \
|
|
|
|
tk create source git podinfo \
|
|
|
|
--url=ssh://git@github.com/stefanprodan/podinfo \
|
|
|
|
--url=ssh://git@github.com/stefanprodan/podinfo \
|
|
|
|
--branch=master
|
|
|
|
--branch=master
|
|
|
|
|
|
|
|
|
|
|
|
# Create a source from a Git repository using SSH authentication and an
|
|
|
|
# Create a source from a Git repository using SSH authentication and an
|
|
|
|
# ECDSA P-521 curve public key
|
|
|
|
# ECDSA P-521 curve public key
|
|
|
|
create source git podinfo \
|
|
|
|
tk create source git podinfo \
|
|
|
|
--url=ssh://git@github.com/stefanprodan/podinfo \
|
|
|
|
--url=ssh://git@github.com/stefanprodan/podinfo \
|
|
|
|
--branch=master \
|
|
|
|
--branch=master \
|
|
|
|
--ssh-key-algorithm=ecdsa \
|
|
|
|
--ssh-key-algorithm=ecdsa \
|
|
|
|
--ssh-ecdsa-curve=p521
|
|
|
|
--ssh-ecdsa-curve=p521
|
|
|
|
|
|
|
|
|
|
|
|
# Create a source from a Git repository using basic authentication
|
|
|
|
# Create a source from a Git repository using basic authentication
|
|
|
|
create source git podinfo \
|
|
|
|
tk create source git podinfo \
|
|
|
|
--url=https://github.com/stefanprodan/podinfo \
|
|
|
|
--url=https://github.com/stefanprodan/podinfo \
|
|
|
|
--username=username \
|
|
|
|
--username=username \
|
|
|
|
--password=password
|
|
|
|
--password=password
|
|
|
@ -115,7 +115,7 @@ func createSourceGitCmdRun(cmd *cobra.Command, args []string) error {
|
|
|
|
name := args[0]
|
|
|
|
name := args[0]
|
|
|
|
|
|
|
|
|
|
|
|
if sourceGitURL == "" {
|
|
|
|
if sourceGitURL == "" {
|
|
|
|
return fmt.Errorf("git-url is required")
|
|
|
|
return fmt.Errorf("url is required")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
tmpDir, err := ioutil.TempDir("", name)
|
|
|
|
tmpDir, err := ioutil.TempDir("", name)
|
|
|
|