check this url: cloudfoundry/cli#1071
By default, config.json is located in your ~/.cf directory. The CF_HOME environment variable allows you to locate the config.json file wherever you like.
after set environment issue is resolved:
Resolve it by create CF_HOME environment var