我是github action工作流的新手
我有一个自托管的跑步者,并且克隆了一个
回购名为xxx
我想在操作工作流程中进行git pull origin branchYY
,以便本地存储库与xxx存储库的远程分支“ branchYY”保持最新状态
我尝试了以下工作流程:
name: Pull origin branchYY
on:
push:
branches:
- branchYY
jobs:
auto-pull:
name: PullOriginBranchYY
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- run: |
git config user.name johnn
git config user.email soemthing@mail.com
git config github.token ${{ secrets.GITHUB_TOKEN }}
git pull origin branchYY
working-directory: /home/user/repos/xxx
但是当地选手正在提示:
“ https://github.com”的用户名:
我不明白为什么它不进行身份验证?
答案 0 :(得分:0)
如文档所述(https://github.com/marketplace/actions/checkout),您应使用适当的参数配置令牌。 我建议您使用ssh进行克隆