Forum Discussion

mfeltscher's avatar
10 years ago

Lithium SDK - 401 HTTP error when submitting plugin

Hi there

 

I started using the new Lithium SDK today and got stuck when trying to upload my plugin to the staging environment. I get the following error:

[18:17:36] Starting 'plugin-upload'...
? Would you like to upload plugin to server? Yes
[18:17:39] Uploading plugin
[18:17:39] server returned status code 401

We are using HTTP basic auth to protect our staging environment from unauthenticated users. I tried to set the corresponding username and password in the server.conf.json configuration file as follows:

{
  "serverUrl": "http://<username>:<password>@<community-stage-url>"
}

Unfortunately I still get the same error as mentioned above.

 

Is there an option to set the HTTP basic auth credentials in the configuration file somehow?

 

 

Thank you in advance.

 

Moreno

  • I don't know if it's changed, but when I was trying to use the plugin tools I had to get my ip address whitelisted (no basic auth) to avoid this issue. Lithium support should be able to arrange it.
  • I don't know if it's changed, but when I was trying to use the plugin tools I had to get my ip address whitelisted (no basic auth) to avoid this issue. Lithium support should be able to arrange it.
  • AlexW's avatar
    AlexW
    Lithium Alumni (Retired)

    The sdk plugin submit endpoint is excluded from HTTP basic auth checking even when it is enabled. So passing the credentials in the server.conf.json is not going to help.

     

    I think what is happening here is that your stage site has IP restriction turned on. In which case, if you are trying to submit from an IP that is not whitelisted, then as nathan mentioned earlier, you need to have the IP address whitelisted before you can submit from that IP.