title: Jenkins with Google Cloud Source Repository
body: <p>I am trying to use Jenkins for CI/CD.
  I've developed a Python flask application. I am deploying this application into Google App Engine. So far I am using <code>gcloud app deploy app.yaml</code> command to deploy application to Google App Engine. </p>
  
  <p>Code for this application is present in Google Cloud Source Repository. </p>
  
  <p>Since the authentication to git(Google Cloud Source Repository) requires Google OAuth, I've installed <a href="https://wiki.jenkins.io/display/JENKINS/Google+OAuth+Plugin" rel="noreferrer">Google OAuth Credentials Plugin</a> </p>
  
  <p>Now I am facing two issues</p>
  
  <ol>
  <li>When I use "Google Service Account from metadata" Credential Kind, I am not seeing the credentials listed in "Source Code Management". 
  <a href="https://i.stack.imgur.com/cKtPy.png" rel="noreferrer"><img src="https://i.stack.imgur.com/cKtPy.png" alt="See screenshot"></a></li>
  <li>when I use "Google Service Account from private key", I am able to see credentials. But when I run my jenkins job I am getting below error</li>
  </ol>
  
  <blockquote>
    <p>FATAL: Could not call
    com.google.jenkins.plugins.source.GoogleRobotUsernamePassword.writeObject()
    : Failed to serialize
    com.google.jenkins.plugins.source.GoogleRobotUsernamePasswordModule$ForRemote#credentials
    for class
    com.google.jenkins.plugins.source.GoogleRobotUsernamePasswordModule$ForRemote
    ---- Debugging information ---- message             : Could not call com.google.jenkins.plugins.source.GoogleRobotUsernamePassword.writeObject()
    cause-exception     : java.lang.RuntimeException cause-message       :
    Failed to serialize
    com.google.jenkins.plugins.source.GoogleRobotUsernamePasswordModule$ForRemote#credentials
    for class
    com.google.jenkins.plugins.source.GoogleRobotUsernamePasswordModule$ForRemote
    ------------------------------- java.lang.UnsupportedOperationException: Refusing to marshal
    org.joda.time.DateTime for security reasons; see
    <a href="https://jenkins.io/redirect/class-filter/" rel="noreferrer">https://jenkins.io/redirect/class-filter/</a>     at
    hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:543)
      at
    com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      at
    com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      at
    com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)</p>
  </blockquote>
  
  <p><strong>Question</strong>: How can I authenticate Google Cloud Source repository in Jenkins? What are the steps|plugins required to use Google Cloud Source repository in Jenkins?</p>