jclouds-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Subhadip Bagui <i.ba...@gmail.com>
Subject Fwd: issue with new google cloud credential
Date Tue, 24 Nov 2015 21:35:11 GMT
This is the code part I'm using.

public static ComputeServiceContext getGoogleClient(){
String provider = "google-compute-engine";
   String identity = "account-2@projectId.iam.gserviceaccount.com";
   String credential = "D:/Project/gCloud/ACE-Project-4bd232d73860.json";
   credential = getCredentialFromJsonKeyFile(credential);

   Properties googleProperties = overrideGoogleCloudProperties();

        ComputeServiceContext computeContext =
                ContextBuilder.newBuilder(provider)
                    .credentials(identity, credential)
                    .modules(
                        ImmutableSet.<Module> of(new
SshjSshClientModule()/*, new SLF4JLoggingModule()*/))
                    .overrides(googleProperties).buildView(
                        ComputeServiceContext.class);
return computeContext;
}

public static Set<? extends Image> getImages(ComputeService compute){
Set<? extends Image> images = compute.listImages();
for(Image image : images){
// System.out.println("Image got as:: id=" +image.getId()+";
name="+image.getName());
System.out.println("Image got as:: "+image);
}
return images;
}

Regards,
Subhadip

-------------------------------------------------------------------------------------------------------------------

---------- Forwarded message ----------
From: Subhadip Bagui <i.bagui@gmail.com>
Date: Mon, Nov 23, 2015 at 11:16 AM
Subject: issue with new google cloud credential
To: user-help@jclouds.apache.org, user@jclouds.apache.org


Hi,

I'm using Jclouds version 1.9.1 and for GCE we are having one working use
case.

Now since my google account got expired I have created a new service
account.

Since then I'm getting the below issue. I'm having trouble to fix the
issue.
As in jcloulds and GCE API as well it's expecting the email as
xxx@developer.gserviceaccount.com to validate the credential.

*Client email account-2@ace-project-xxxx.iam.gserviceaccount.com
<account-2@ace-project-xxxx.iam.gserviceaccount.com> is malformed. Should
be client_email*
* which usually looks like project_id@developer.gserviceaccount.com
<project_id@developer.gserviceaccount.com> or
project_id-extended_uid@developer.gserviceaccount.com
<project_id-extended_uid@developer.gserviceaccount.com> *


Regards,
Subhadip

-------------------------------------------------------------------------------------------------------------------

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message