无法为 GitHub 操作运行语义发布 cli 设置
Posted
技术标签:
【中文标题】无法为 GitHub 操作运行语义发布 cli 设置【英文标题】:Cannot run semantic-release-cli setup for GitHub action 【发布时间】:2021-04-23 12:48:01 【问题描述】:使用 GitHub Actions 为我的公共存储库 https://github.com/henrycity/movie-browser-frontend 运行 npx semantic-release-cli
设置时,出现此错误
ERR! semantic-release RequestError: Error: Invalid URI "undefined/repos/henrycity/movie-browser-frontend/actions/secrets/public-key"
ERR! semantic-release at new RequestError (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request-promise-core/lib/errors.js:14:15)
ERR! semantic-release at Request.plumbing.callback (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request-promise-core/lib/plumbing.js:87:29)
ERR! semantic-release at Request.RP$callback [as _callback] (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request-promise-core/lib/plumbing.js:46:31)
ERR! semantic-release at self.callback (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request/request.js:185:22)
ERR! semantic-release at Request.emit (events.js:315:20)
ERR! semantic-release at Request.init (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request/request.js:273:17)
ERR! semantic-release at Request.RP$initInterceptor [as init] (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request-promise-core/configure/request2.js:45:29)
ERR! semantic-release at new Request (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request/request.js:127:8)
ERR! semantic-release at request (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request/index.js:53:10)
ERR! semantic-release at /Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/node_modules/request/index.js:100:12
ERR! semantic-release at createSecret (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/src/lib/github-actions.js:36:28)
ERR! semantic-release at module.exports (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/src/lib/github-actions.js:83:9)
ERR! semantic-release at module.exports (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/src/lib/ci.js:50:17)
ERR! semantic-release at processTicksAndRejections (internal/process/task_queues.js:97:5)
ERR! semantic-release at module.exports (/Users/tri.tran/.nvm/versions/node/v12.18.3/lib/node_modules/semantic-release-cli/src/index.js:90:5)
我试图在https://github.com/semantic-release/cli/blob/master/src/lib/ci.js 中记录信息对象。我注意到info.github.endpoint
是undefined
,这会导致错误。
giturl: 'https://github.com/henrycity/movie-browser-frontend.git',
ghrepo: slug: [ 'henrycity', 'movie-browser-frontend', '' ] ,
npm:
registry: 'https://npm.pkg.github.com/',
authmethod: 'token',
username: 'henrycity',
password: 'xxxx,
token: 'xxxx'
,
github: token: 'xxxx
版本:5.4.1
我想知道是什么导致了错误。
【问题讨论】:
我得到了完全相同的错误。关于为什么会发生这种情况的任何进展? 我在 GitHub 上创建了一个问题,维护者在 5.4.3 版本中修复了这个问题。 【参考方案1】:该问题已在 5.4.3 版本中修复。
【讨论】:
以上是关于无法为 GitHub 操作运行语义发布 cli 设置的主要内容,如果未能解决你的问题,请参考以下文章
Cordova 无法从 CLI 构建,但从 XCode xcworkspace 构建可以完美运行