title: Error when using Git credential helper with gnome-keyring as Sudo
body: <p>I was looking for a way to store credentials securely while connecting to our Git server which uses SSL. I came across this suggestion by @james-ward (only edit I made was I updated our "system" config instead of our "global" config for Git (<a href="https://stackoverflow.com/a/14528360/6195194">https://stackoverflow.com/a/14528360/6195194</a>)</p>
  
  <pre><code>sudo apt-get install libgnome-keyring-dev
  cd /usr/share/doc/git/contrib/credential/gnome-keyring
  sudo make
  git config --system credential.helper /usr/share/doc/git/contrib/credential/gnome-keyring/git-credential-gnome-keyring
  </code></pre>
  
  <p>I then can run</p>
  
  <pre><code>git clone https://ipaddress/git/repo.git
  </code></pre>
  
  <p>and the credential helper will store my credentials, however when I run the following:</p>
  
  <pre><code>sudo git clone https://ipaddress/git/repo.git testfolder
  </code></pre>
  
  <p>it give me the following error</p>
  
  <pre><code>** (process:3713): CRITICAL **: Error communicating with gnome-keyring-daemon
  </code></pre>
  
  <p>I sometimes need to run sudo git clone since sometimes the directory where I need to make a clone requires it. Any help would be appreciated.</p>
  
  <p>Versions I am using:
   - git version 1.9.1
   - Ubuntu Server 14.0.4</p>
  
  <p>Thank you in advance!
  -Richard O.</p>