Cannot set property 'privateKey' of undefined

New post

Comments

10 comments

  • Official comment
    cbetta

    I think I found out the issue, it's a bug with our CLI. I have reported the issue and a fix.

    https://github.com/box/boxcli/issues/207

    https://github.com/box/boxcli/pull/206

    Meanwhile, the way forward is to copy your PEM into the config.json file, removing any new lines. We hope to have a new release out asap.

    Comment actions Permalink
  • cbetta

    Hi there, what operating system are you on? If you are on linux/mac then the pem might not have the right permissions to be read.

    0
    Comment actions Permalink
  • Hai Li Liu

    Thanks.

    I have set the permission with chmod -R 777 . There is still this mistake.
    Set the cli comment is  box configure:environments:add ./455328__config.json --private-key-path /Users/liuhl/Desktop/test/backuptest/private.pem

    private.pem was created by the bellow comments.

    openssl genrsa -des3 -out private.pem 2048
    openssl rsa -in private.pem -outform PEM -pubout -out public.pem

    455328__config.json like below.

    0
    Comment actions Permalink
  • cbetta

    And you are still getting the same error?

    0
    Comment actions Permalink
  • Hai Li Liu

    Yes There is still the same error.

    My computer is mac.

    0
    Comment actions Permalink
  • cbetta

    I am running into the same issue. Let me check with the CLI team.

    0
    Comment actions Permalink
  • Hai Li Liu

    Thank you very much.

    0
    Comment actions Permalink
  • cbetta

    So we discovered this was a bug. I have submitted a patch and am now waiting for them to merge this patch and release a new version of the CLI.

    https://github.com/box/boxcli/pull/206

    0
    Comment actions Permalink
  • Hai Li Liu

    Thanks.
    I have fix the issue on my local with the code of https://github.com/box/boxcli/pull/206/files

    0
    Comment actions Permalink
  • cbetta

    Excellent!

    0
    Comment actions Permalink

Please sign in to leave a comment.