This is the code part I'm using.

public static ComputeServiceContext getGoogleClient(){
String provider = "google-compute-engine";
   String identity = "[email protected]";
   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 <[email protected]>
Date: Mon, Nov 23, 2015 at 11:16 AM
Subject: issue with new google cloud credential
To: [email protected], [email protected]


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
[email protected] to validate the credential.

*Client email [email protected]
<[email protected]> is malformed. Should
be client_email*
* which usually looks like [email protected]
<[email protected]> or
[email protected]
<[email protected]> *


Regards,
Subhadip

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

Reply via email to