boxcli error "Could not read environments config file"




  • 正式なコメント
    Mike Grytsai


    The error states that Box CLI can't find the valid configuration file.

    The easiest way to fix that is to download new config file from the developer console, and provide the path to the downloaded file in the CLI using the following command: 

    box configure:environments:update --name=<enviroment_name> --config-file-path=/path/to/downloaded/config_file.json


    Another alternative would be to authenticate in CLI using OAuth following the guide 

    コメントアクション パーマリンク
  • Naima Personal

    Fixed! Path was accurate. Previously I copied the content of the config file to the server's config file. When I directly transferred the config file to the server, it worked though there weren't any difference in the content; I have done this same way before as well without any errors. Don't know why it happened this time. 

    Thank you so much for your help. Sincerely appreciate it.

    コメントアクション パーマリンク
  • Naima Personal

    Hi Mr. Mike,

    Thank you so much for your response. Appreciate it.

    when I run "box configure:environments:get", its information "Client ID" "Enterprise ID" , "Box config File Path" everything match with the previous config.json file but still it didn't work.

    I'm following the first way to fix it. When I try this it gives the following error though the file is present to the path: 400 is the new config.json file's permission.

    box configure:environments:update --name=def --config-file-path=/file/path/config.json
    Could not read environment config file /file/paht/config.json.

    What could be the reason of this problem am I not following the instruction in right way? If you could help with that would be appreciable. Thank you!

    コメントアクション パーマリンク
  • Mike Grytsai

    Reasons for the below error could be that path provided to the config file is wrong. 

    Are you sure you provided the right file path? you can test it by executing `cat /file/path/config.json`, this will print out the content inside your configuration file.



    コメントアクション パーマリンク
  • Naima Personal

    Thank you Mr. Mike. 

    Appreciate your response. 

    Yes, I have done that for both, that gives the content of the both files which most likely mean given path is accurate; for previous config file, content like "enterpriseID", "clientID", are exact match of the output of the command "$ box configure:environments:get or box configure:environments:get -c"

    コメントアクション パーマリンク