简体   繁体   English

Git 不知道我的姓名/电子邮件时 Github 操作部署 R ZEFE90A8E604A67C840E8D8D 文档

[英]Git doesn't know my name/email when Github Actions deploy R package documentation and breaks

For a while now I've been happily using Github's Actions to run my library's R CMD check and deploying the package's documentation.一段时间以来,我一直在愉快地使用 Github 的 Actions 来运行我的库的R CMD check和部署包的文档。 Suddenly the package action started failing with the following error:突然, package 操作开始失败,并出现以下错误:

── Commiting updated site ──────────────────────────────────────────────────────
Running git add -A .
Running git commit --allow-empty -m 'Built site for lares: 4.9.0@d936943'

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'runner@Mac-1594850189701.(none)')

Error: System command 'git' failed, exit status: 128, stdout & stderr were printed

 Stack trace:

 1. pkgdown::deploy_to_branch(new_process = FALSE)
 2. pkgdown:::github_push(dest_dir, commit_message, remote, branch)
 3. pkgdown:::with_dir(dir, { ...
 4. base:::force(code)
 5. pkgdown:::git("commit", "--allow-empty", "-m", commit_message)
 6. processx::run("git", c(...), echo_cmd = echo_cmd, echo = echo,  ...
 7. throw(new_process_error(res, call = sys.call(), echo = echo,  ...

 x System command 'git' failed, exit status: 128, stdout & stderr were printed 

── Removing worktree ───────────────────────────────────────────────────────────
Running git worktree remove \
  /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/Rtmpp2vz58/file888686837c1
Execution halted
##[error]Process completed with exit code 1.

I've tried running those commands with my name and email from RStudio's terminal, tried from different computers I code, checked pkgdown::deploy_to_branch() documentation... with no success.我试过用我的名字和 RStudio 终端上的 email 运行这些命令,从我编码的不同计算机上尝试过,检查pkgdown::deploy_to_branch()文档......但没有成功。

Any idea how to solve this?知道如何解决这个问题吗? What am I not seeing?我没看到什么? Is it a bug on something that recently changed?这是最近改变的东西的错误吗?

- run: |
       git config --global user.email "you@example.com"
       git config --global user.name "Your Name"

Just add step like that somewhere in your workflow.只需在您的工作流程中的某处添加这样的步骤即可。

In fact, it looks you already (almost) wrote a fix but decided for some reason to use Rscript as shell for that, and didn't close ' .实际上,看起来您已经(几乎)编写了一个修复程序,但出于某种原因决定为此使用Rscript作为 shell ,并且没有关闭' That threw other kind of error so you kicked it out and are back at square one:)这引发了其他类型的错误,因此您将其踢出并回到第一方:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM