Create a config file with zowe config init
Create a Zowe CLI team configuration file with zowe config init, which prompts for host, port and user and writes zowe.config.json.
Zowe CLI v3 keeps connection details in a JSON file, and zowe config init writes the first one.
zowe config init --prompt-for-valuesThe command asks for the values it needs, including the z/OSMF host, port, user and password, and then writes zowe.config.json in the current directory. Add --global-config to put the file in your home directory under ~/.zowe so that it applies from any folder, and --user-config for a file that holds only your own, private values.
{
"profiles": {
"zosmf": {
"type": "zosmf",
"properties": { "host": "mf.example.com", "port": 443 },
"secure": ["user", "password"]
}
},
"defaults": { "zosmf": "zosmf" }
}The secure list is the notable part: user and password are not stored in the file, but in the operating system's credential store. Because of that, a project's zowe.config.json can be committed, while the zowe.config.user.json that holds personal overrides must not be. The layout is from Zowe CLI v3.