我正在尝试使用grunt-gh-pages扩展来提交我的gh-branch.它在本地工作正常但是当我使用TRAVIS-CI时它会失败.它给出以下错误消息 -
Warning: fatal: remote error:
You can't push to git://github.com/tusharmath/tusharm.com.git
Use https://github.com/tusharmath/tusharm.com.git
Use --force to continue.
Run Code Online (Sandbox Code Playgroud)
当我更新repo选项时,我收到以下错误 -
Warning: remote: Anonymous access to tusharmath/tusharm.com.git denied.
fatal: Authentication failed for 'https://github.com/tusharmath/tusharm.com.git/'
Use --force to continue.
Aborted due to warnings.
Run Code Online (Sandbox Code Playgroud)
所以基本上我只想让Travis-ci在我的仓库的gh-pages分支中提交文件.有没有办法做到这一点?
更新.travis.yml解决问题的决赛
language: node_js
node_js:
- '0.11'
before_script:
- git config --global user.email "tusharmath@gmail.com"
- git config --global user.name "Travis-CI"
after_script:
- git config credential.helper "store --file=.git/credentials"
- echo "https://${GH_TOKEN}:@github.com" > .git/credentials
- node ./node_modules/grunt-cli/bin/grunt release
env: …Run Code Online (Sandbox Code Playgroud) 在调查我最近的问题时,Sonarcloud与Travis,Maven和github失败了,我意识到我在问错误的问题.我试图解决一个症状而不是潜在的问题.
我工作的项目(eclipse /扫描)使用Github作为其存储库,使用Travis与Sonarcloud进行持续集成和代码分析.
虽然Sonarcloud分析在内部拉取请求(从分支直接推送到eclipse /扫描的拉取请求)上运行良好,但当Travis运行外部拉取请求(来自分叉回购)时,它不起作用.
根本问题在于,我们目前运行sonarcloud的方式依赖于环境变量,这些变量由于安全原因而未填充外部拉取请求:
Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#Pull-Requests-and-Security-Restrictions
Run Code Online (Sandbox Code Playgroud)
我们的存储库设置不关心Sonarcloud是否运行,但这意味着我们经常合并破坏sonarcloud规则的更改,因为我们没有意识到它们已被破坏.我们只看到这些规则在下次被直接推送到存储库的人更改时被破坏了.这将Sonarcloud发现的问题从协作者转移到提交者的负担转移了.
所以,
请注意,这个问题似乎是在Travis Public Repository之外的一步,如何添加一个对Pull请求起作用的Secure变量,它还没有答案.