401 trying to get the EMG configuration

I am trying to run the very first EMG 2.0.0 configuration step:

$ sudo su -c "/usr/local/emg/cli/edgemicro configure --org xxxx --env dev --username yyyy --debug" emg

password:

deleted /home/emg/.edgemicro/hpcorp-cwp-dev-config.yaml

init config

file doesn't exist, setting up

checking for previously deployed proxies

listdeployments: {"organization":"xxxx","environment":"dev","baseuri":"https://api.enterprise.apigee.com","username":"yyyy","password":{},"debug":true,"asyncLimit":4}

Going to invoke "https://api.enterprise.apigee.com/v1/o/hpcorp-cwp/e/dev/deployments"

[Error: HTTP error 401]

The same error happens with the password passed explicitly on the command-line. I am using the same credentials (successfully) to log into https://enterprise.apigee.com/. What could be root cause of my problem?

1 6 440
6 REPLIES 6

Hmm are you an org admin to the org hpcorp-cwp ?

Yes, I am. See the attached screen-shot.

2706-screen-shot-2016-05-17-at-193851.png

Pls try one cURL for me and if you still get 401 then you would have to file a support ticket. I don't have access to other resources to debug it.

curl -v -X GET https://api.enterprise.apigee.com/v1/o/hpcorp-cwp/e/dev/deployments --user name:password

@prabhat I have provided the command-line credentials in a direct email. Here is the execution log:

$ curl -v -X GET https://api.enterprise.apigee.com/v1/o/hpcorp-cwp/e/dev/deployments --user xxxx:yyyy

* About to connect() to api.enterprise.apigee.com port 443 (#0)

* Trying 54.209.30.204... connected

* successfully set certificate verify locations:

* CAfile: none

CApath: /etc/ssl/certs

* SSLv3, TLS handshake, Client hello (1):

* SSLv3, TLS handshake, Server hello (2):

* SSLv3, TLS handshake, CERT (11):

* SSLv3, TLS handshake, Server key exchange (12):

* SSLv3, TLS handshake, Server finished (14):

* SSLv3, TLS handshake, Client key exchange (16):

* SSLv3, TLS change cipher, Client hello (1):

* SSLv3, TLS handshake, Finished (20):

* SSLv3, TLS change cipher, Client hello (1):

* SSLv3, TLS handshake, Finished (20):

* SSL connection using ECDHE-RSA-AES128-GCM-SHA256

* Server certificate:

* subject: OU=Domain Control Validated; CN=api.enterprise.apigee.com

* start date: 2016-01-22 05:14:38 GMT

* expire date: 2016-11-14 06:09:54 GMT

* subjectAltName: api.enterprise.apigee.com matched

* issuer: C=US; ST=Arizona; L=Scottsdale; O=GoDaddy.com, Inc.; OU=http://certs.godaddy.com/repository/; CN=Go Daddy Secure Certificate Authority - G2

* SSL certificate verify ok.

* Server auth using Basic with user 'asnowfix'

> GET /v1/o/hpcorp-cwp/e/dev/deployments HTTP/1.1

> Authorization: Basic zzzz

> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3

> Host: api.enterprise.apigee.com

> Accept: */*

>

< HTTP/1.1 401 Unauthorized

< Content-Type: application/json

< Date: Wed, 18 May 2016 09:53:13 GMT

< Server: Apigee Router

* Authentication problem. Ignoring this.

< WWW-Authenticate: Basic realm="/o/yyyy/e/dev/deployments"

< Content-Length: 0

< Connection: keep-alive

<

* Connection #0 to host api.enterprise.apigee.com left intact

* Closing connection #0

* SSLv3, TLS alert, Client hello (1):

You can close this ticket: using my email address rather than my apogee username fixes the problem...

Glad you got that figured. I just looked at the curl you had sent me and I was going to suggest the same.