Get Context

Description

Get a specific context or an array of contexts.

Passing [name] argument will cause a retrieval of a specific context.
In case of not passing [name] argument, a list will be returned.

Command

codefresh get contexts [name..]

Aliases

codefresh get ctx [name..]

codefresh get context [name..]

Arguments

Option Alias Default Description
name context name

Options

Option Alias Type Default Description
--help Print help information
--type Context type

Possible values:
- config
- git.bitbucket-server
- git.bitbucket
- git.github
- git.github-app
- git.codefresh-github-app
- git.gitlab
- git.stash
- helm-repository
- secret-yaml
- secret
- storage.gc
- storage.s3
- yaml
- secret-store.kubernetes
- secret-store.kubernetes-runtime
--decrypt Either to show decoded credentials or not
--prepare Activate tokens in case its invalid. It’s supported only for types: git.codefresh-github-app, git.github-app and git.bitbucket (OAuth2)
--force-prepare Refresh the token even if the current token is still valid. Unlike --prepare, which only refreshes expired tokens, this flag forces a token refresh unconditionally. It’s supported only for git.bitbucket (OAuth2)

Output Options

Option Alias Type Default Description
--select-columns --sc Columns to select for table output
--output -o Output format

Possible values:
- json
- yaml
- wide
- name
- id
- jsonArray
- yamlArray
--date-format --df Provide predefined or custom date format. Predefined options: [“default”, “date”, “datetime”, “date-diff”]
--pretty Use colors and signs for output
--watch -w boolean false Watching updates to a particular resource
--watch-interval number 3 Interval time at watching mode (in seconds)

Examples

Get context NAME

codefresh get context NAME

Get context by NAME and active token if it’s expired

codefresh get context NAME --prepare

Get all contexts

codefresh get contexts

Get all contexts with credentials decrypted

codefresh get context --decrypt

Get all secret contexts

codefresh get context --type secret

Get all git based contexts for github kind

codefresh get context --type git.github

Get all helm-repository contexts

codefresh get context --type helm-repository