<p>I was on craft  v3.7.24, but I needed bugfixes in 3.7.25.1.
Both Craft update console command and composer told me they couldn't authenticate against GitHub and/or needed an API token.</p>
<pre><code>composer update craftcms/cms
Loading composer repositories with package information
Updating dependencies                                 
Lock file operations: 0 installs, 1 update, 0 removals
  - Upgrading craftcms/cms (3.7.24 =&gt; 3.7.26)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
  - Downloading craftcms/cms (3.7.26)

Could not fetch https://api.github.com/repos/craftcms/cms/zipball/97c8598b3c71a1b88e6bbe4ee35c3720e5fa5d7e, please review your configured GitHub OAuth token or enter a new one to access private repos
Head to https://github.com/settings/tokens/new?scopes=repo&amp;description=Composer+on+soeren-ThinkPad-T470p+2021-12-22+1737
to retrieve a token. It will be stored in &quot;/home/soeren/.config/composer/auth.json&quot; for future use by Composer.
Token (hidden):
</code></pre>
<p>I &quot;solved&quot; the problem by providing one, but I don't think that's a real solution, because there is absolutely no reason why I should need an authentication against GitHub when updating craft via composer. When googling this was the only solution I found. Not a single post doubting composer needed any authentication to download a public zipball.</p>
<p>It might be completely unrelated to CraftCMS and instead due to some forked repositories I hostED at GitHub. However, they aren't on GitHub anymore (using bitbucket now) and they shouldn't have been affected by the update anyway.
If anybody has got an idea, why composer would need an authentication against GitHub to update Craft, I'd be glad to hear.</p>

CC BY-SA 4.0
2021-12-28T23:14:08.397Z
Do you have a git repository listed in your `composer.json` file as a source?
CraftQuest
CC BY-SA 4.0
2022-01-03T11:02:20.153Z
I do have git repositories in my composer.json. They point to BitBucket and have nothing to do with craftcms and its dependencies, but yes, I do. And I DID have GitHub repositories in my composer.json, too. Still nothing to do with CraftCMS, though.
S. Parton
<craft3><composer>
Composer needs GitHub token to update craft cms
# Composer needs GitHub token to update craft cms

(Asked by: username_0 on 2021-12-22)

I was on craft  v3.7.24, but I needed bugfixes in 3.7.25.1.
Both Craft update console command and composer told me they couldn't authenticate against GitHub and/or needed an API token.
composer update craftcms/cms
Loading composer repositories with package information
Updating dependencies                                 
Lock file operations: 0 installs, 1 update, 0 removals
  - Upgrading craftcms/cms (3.7.24 => 3.7.26)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
  - Downloading craftcms/cms (3.7.26)

Could not fetch https://api.github.com/repos/craftcms/cms/zipball/97c8598b3c71a1b88e6bbe4ee35c3720e5fa5d7e, please review your configured GitHub OAuth token or enter a new one to access private repos
Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+soeren-ThinkPad-T470p+2021-12-22+1737
to retrieve a token. It will be stored in "/home/soeren/.config/composer/auth.json" for future use by Composer.
Token (hidden):

I "solved" the problem by providing one, but I don't think that's a real solution, because there is absolutely no reason why I should need an authentication against GitHub when updating craft via composer. When googling this was the only solution I found. Not a single post doubting composer needed any authentication to download a public zipball.
It might be completely unrelated to CraftCMS and instead due to some forked repositories I hostED at GitHub. However, they aren't on GitHub anymore (using bitbucket now) and they shouldn't have been affected by the update anyway.
If anybody has got an idea, why composer would need an authentication against GitHub to update Craft, I'd be glad to hear.

**Tags:** craft3, composer

> **Comments:**
> **username_1**: Do you have a git repository listed in your `composer.json` file as a source?  
> **username_0**: I do have git repositories in my composer.json. They point to BitBucket and have nothing to do with craftcms and its dependencies, but yes, I do. And I DID have GitHub repositories in my composer.json, too. Still nothing to do with CraftCMS, though.  

---

## 0 answers

