Set a remote git repository as the dynamic context for
anchor configuration is based on config contexts, each is pointing to a remote/local git repository. When running an
anchor command, it must have an active context in order to reflect its dynamic CLI menu based on the git repository structure.
currentContext, the user will be prompoted by an interactive menu to select which of the available config contexts he would like to use for a specific command run.
- If no context is defined - the user is prompted to select a context
- If a context is already defined - a remote repository scan takes place for possible changes if
autoUpdatewas enabled and the command is executed afterwards
Set Context Entry
Register a new remote git repository or update an existing one as an
anchor config context. Use the flags to control each remote repository with default values and/or custom ones. Every remote marketplace repository is identified under a distinct config context name.
||URL of the remote Git repository||
||Specify a branch to fetch HEAD references||
||Specific commit to check out||
||Local path to clone the repository into.
||Allow checking remote marketplace for available changes and auto update if there are any.
Performs a remote check on every
||Local path of an
||Set the newly registered config context as the active one||
An example of how to register a remote git repository with custom attributes under ops-team as its config context identifier:
anchor config set-context-entry ops-team \ --email@example.com:Organization/OpsMarketplace.git \ --repository.remote.branch=my-branch \ --repository.remote.revision=123456789abcdefg \ --repository.remote.clonePath=/custom/path/to/config \ --repository.remote.autoUpdate=true
View the local configuration by printing it to the terminal as plain text:
anchor config view
Edit the local configuration by entering into a text edit mode:
anchor config edit