首页 > 解决方案 > 从 travis 构建修改 github 公共存储库

问题描述

在我的第一个公共存储库https://github.com/yafred/test-push/的构建中,我尝试修改我的第二个存储库https://github.com/yafred/test

1/ 我正在使用与repo我用于部署版本的范围 (GH_TOKEN) 相同的个人访问令牌。

2/ 我正在执行的命令.travis.yml

language: generic

script: 
  - git clone https://github.com/yafred/test.git
  - cd test
  - echo "hello" > test.txt
  - git add .
  - git -c user.name='travis' -c user.email='travis' commit -m  refresh
  - git push -f -q https://{$GH_TOKEN}@github.com/yafred/test master

我根据搜索尝试了一些命令变体,但我不断收到身份验证错误

0K$ git push -f -q https://{$GH_TOKEN}@github.com/yafred/test master
remote: Invalid username or password.
fatal: Authentication failed for 'https://{[secure]}@github.com/yafred/test/'

有可能吗?我究竟做错了什么 ?

标签: githubtravis-ci

解决方案


推荐阅读