## 事象
[[Checkout (GitHub Actions)|Checkout]] (v4) の[[アクション (GitHub Actions)|アクション]]を実行すると以下のエラーが出る。
```error
Unexpected input(s) 'repo-token', valid inputs are ['repository', 'ref', 'token', 'ssh-key', 'ssh-known-hosts', 'ssh-strict', 'persist-credentials', 'path', 'clean', 'filter', 'sparse-checkout', 'sparse-checkout-cone-mode', 'fetch-depth', 'fetch-tags', 'show-progress', 'lfs', 'submodules', 'set-safe-directory', 'github-server-url']
```
`with`で`repo-token`を指定しているのが原因かも...
```yaml
steps:
- uses: actions/checkout@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
```
これは以下の解決方法として設定していた。
<div class="link-card">
<div class="link-card-header">
<img src="https://publish-01.obsidian.md/access/35d05cd1bf5cc500e11cc8ba57daaf88/favicon-64.png" class="link-card-site-icon"/>
<span class="link-card-site-name">minerva.mamansoft.net</span>
</div>
<div class="link-card-body">
<div class="link-card-content">
<p class="link-card-title">📝GitHub ActionsでAPI rate limitのエラーになる</p>
</div>
<img src="https://publish-01.obsidian.md/access/35d05cd1bf5cc500e11cc8ba57daaf88/Notes/attachments/minerva-image.webp" class="link-card-image" />
</div>
<a class="internal-link" data-href="Notes/📝GitHub ActionsでAPI rate limitのエラーになる.md"></a>
</div>
%%[[📝GitHub ActionsでAPI rate limitのエラーになる]]%%
## 原因
(おそらく) [[Checkout (GitHub Actions)|Checkout]]のv4で`repo-token`が廃止されたため。
## 解決方法
`repo-token`のプロパティを削除する。
READMEの以下記載から、指定しなければ`github.token`が使用される。
```
# Personal access token (PAT) used to fetch the repository. The PAT is configured
# with the local git config, which enables your scripts to run authenticated git
# commands. The post-job step removes the PAT.
#
# We recommend using a service account with the least permissions necessary. Also
# when generating a new PAT, select the least scopes necessary.
#
# [Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
#
# Default: ${{ github.token }}
token: ''
```
以下のドキュメントより、`GITHUB_TOKEN`は`github.token`と指定してもよいと記載されている。
<div class="link-card">
<div class="link-card-header">
<img src="https://docs.github.com/assets/cb-345/images/site/favicon.png" class="link-card-site-icon"/>
<span class="link-card-site-name">GitHub Docs</span>
</div>
<div class="link-card-body">
<div class="link-card-content">
<p class="link-card-title">Automatic token authentication - GitHub Docs</p>
<p class="link-card-description">GitHub provides a token that you can use to authenticate on behalf of GitHub Actions.</p>
</div>
<img src="https://github.githubassets.com/images/modules/open_graph/github-logo.png" class="link-card-image" />
</div>
<a href="https://docs.github.com/en/actions/security-guides/automatic-token-authentication"></a>
</div>
> The token is also available in the `github.token` context. For more information