title: Gitolite: can not push to repository
body: <p>I'm in a situation where I have a local source tree that was cloned from a git repository, that I'm trying to push to a new remote location.</p>
  
  <p>I installed gitolite on the server using the package method (deb). I followed the <a href="http://sitaramc.github.com/gitolite/rpmdeb.html" rel="nofollow noreferrer">Wiki instructions</a>, ending with a successful <code>git clone gitolite@localhost:gitolite-admin</code>. I then added the new repository, and my public keys. I can clone this repository on my machine (the client), but am not able to push into it. The <a href="http://sitaramc.github.com/gitolite/sts.html" rel="nofollow noreferrer">SSH troubleshooting document</a> describes <a href="https://stackoverflow.com/questions/5233058/gitolite-push-error-remote-env-gl-rc-not-set">my scenario</a> aptly:</p>
  
  <blockquote>
    <p>consider git@server:repositories/reponame.git. The clone operation
    will work -- you're using the full Unix path, (assuming default
    $REPO_BASE setting), and so the shell finds the repo where you said it
    would be. However, when you push, gitolite's update hook kicks in, and
    fails to run because some of the environment variables it is expecting
    are not present</p>
  </blockquote>
  
  <p>So, I can clone with </p>
  
  <p><code>git clone gitolite@server.com:repositories/reponame.git</code></p>
  
  <p>but not with</p>
  
  <p><code>git clone gitolite@server.com:reponame.git</code> (I get <code>fatal: 'reponame.git' does not appear to be a git repository</code>)</p>
  
  <p>If I make changes to the cloned (empty) repository and try to push, I get </p>
  
  <blockquote>
    <p>remote: ENV GL_RC not set remote: BEGIN failed--compilation aborted at
    hooks/update line 20. remote: error: hook declined to update
    refs/heads/master</p>
  </blockquote>
  
  <p>So, this seems related to the prefixing - however, as I've mentioned, I can not clone the repo without including the <code>repositories/</code> specifier in the path. </p>
  
  <p>Is this what is meant by "bypassing gitolite"? How can I rectify the situation? Ultimately, I want to push the entire pre-existing source tree to the new remote (I've added the new server as a remote in <code>.git/config</code>), and maintain history.</p>