title: Build with Travis-ci and push some files/folder to another repository
body: <p>If anyone can take a look at this and maybe point me in the right direction. It's been 2 days and I can't find a solution. There is a similar issue <a href="https://stackoverflow.com/questions/18027115/comitting-via-travis-ci-failing">here</a>, and I may be missing something.
  You can see the travis-ci build log <a href="https://travis-ci.org/JamesDullaghan/foundation/builds/13650473" rel="nofollow noreferrer">here</a></p>
  
  <p>The error message is:</p>
  
  <pre><code>remote: Anonymous access to JamesDullaghan/bower-foundation-css.git denied.
  fatal: Authentication failed for 'https://github.com/JamesDullaghan/bower-foundation-css.git/'
  </code></pre>
  
  <p>.travis.yml file</p>
  
  <pre><code>language: node_js
  node_js:
  - '0.10'
  env:
    global:
    - secure: some-long-string-of-characters-numbers
  branches:
    only:
    - somebranch
  before_script:
    - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" &gt;&gt; ~/.ssh/config
    - git config --global user.email "myemail@email.com"
    - git config --global user.name "myname"
    - git config credential.helper "store --file=~/.git/credentials"
    - echo "https://${GH_TOKEN}:@github.com" &gt; ~/.git/credentials
  script:
  - npm install grunt
  - npm install grunt-cli
  - grunt compile
  after_success:
  - git clone https://github.com/myname/repo2.git
  - cp -r dist/assets/* repo2/
  - cd repo2
  - git add .
  - git commit -m "build to repo2"
  - git push -fq origin master
  - echo -e "Done with magic\n"
  </code></pre>
  
  <p>I have run <code>travis encrypt GH_TOKEN="mytoken" --add</code> and I've tried creating a new token in github twice to see if I was doing that incorrectly.</p>
  
  <p>Any help at this point is greatly appreciated.</p>