1

誰かがこれを見て、おそらく私を正しい方向に向けることができれば. 2日経ちましたが、解決策が見つかりません。ここにも同様の問題があり、何かが欠けている可能性があります。ここでtravis-ciのビルドログを見ることができます

エラーメッセージは次のとおりです。

remote: Anonymous access to JamesDullaghan/bower-foundation-css.git denied.
fatal: Authentication failed for 'https://github.com/JamesDullaghan/bower-foundation-css.git/'

.travis.yml ファイル

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" >> ~/.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" > ~/.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"

私は実行travis encrypt GH_TOKEN="mytoken" --addし、github で新しいトークンを 2 回作成して、それが間違っているかどうかを確認しました。

この時点でのヘルプは大歓迎です。

4

1 に答える 1

1

ファイルを使用していませんが、ここで答えを見つけました。.git/credentials/

要約すると、Travis-ci がリポジトリをクローンする方法を制御することはできません。これは、リモートが認証資格情報を使用してセットアップされていないことを意味するため、リモートを削除し、資格情報を使用してリモートを追加します。

cd clonedrepofolder
git remote rm origin
git remote add origin https://username:${GH_TOKEN}@github.com/username/repo.git
于 2013-11-07T21:26:28.567 に答える