如何解决尽管GitHub Actions似乎可以使用ssh-access进行工作,但仍无法通过SSH加载
我正在执行一个github动作来在我的PR和push上运行测试,但是我无法确保测试能够访问我的私有存储库。
我已经在本地测试了我使用的SSH凭据,并且它们100%有效。
https://github.com/webfactory/ssh-agent
这是我正在使用的SSH代理。
这是我的github动作
# This workflow will do a clean install of node dependencies,build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches:
- master
- release/*
pull_request:
branches:
- master
- release/*
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x,12.x,14.x]
steps:
- uses: actions/checkout@v2
- uses: webfactory/ssh-agent@v0.4.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
它似乎没有尝试利用它得到的SSH密钥
解决方法
由于https://github.com/Tixpire/tixpire-server似乎是私有的,因此您需要使用PAT (personal access token)来访问它。
另请参见actions/checkout issue 95。
这是一个HTTPS URL,因此没有大量的SSH密钥将起作用:您需要一个SSH URL(git@github.com:Tixpire/tixpire-server
)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。