如果有人可以看看这个,也许可以指出我正确的方向。已经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 中创建一个新令牌两次,看看我是否做错了。
在这一点上的任何帮助都非常感谢。