我正在尝试在Github actions中克隆另一个私有仓库。我已经在运行actions的repo的secrets中设置了SECRET_USER
和SECRET_PASSWORD
。在actions中,我运行以下命令:
git clone https://$SECRET_USER:$SECRET_PASSWORD@github.com/other-organization/other-repo.git
但是出现了错误
Cloning into 'other-repo'...
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/other-organization/other-repo.git/'
##[error]Process completed with exit code 128.
在Github Actions中,尽管我已经验证了用户可以访问
https://github.com/other-organization/other-repo
(这显然不是内部仓库的真实URL),但仍存在问题。
git clone https://$SECRET_USER:$SECRET_PASSWORD@github.com/other-organization/other-repo.git
是否可用? - Patrick Quirk${{ secrets.SECRET_USER }}
,除非您的run
步骤正在设置env
变量。 - peterevans