Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

composer update error

sometimes the pipeline returns error which says:

+ composer update
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 29 installs, 49 updates, 0 removals
- Installing kylekatarnls/update-helper (1.2.0): Downloading (connecting...) Downloading (0%) Failed to download kylekatarnls/update-helper from dist: Could not authenticate against github.com
Now trying to download from source
- Installing kylekatarnls/update-helper (1.2.0): Cloning 5786fa188e

[RuntimeException]

Failed to clone https://github.com/kylekatarnls/update-helper.git, git was not found, check that it is installed and in your PATH env.

sh: 1: git: not found

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...

5 answers

1 accepted

0 votes
Answer accepted

Here's a recent blog post I found in Google, probably explains what is happening: Composer Based Continuous Integration (CI) Builds Failing Because of Github Rate Limiting

 

from Daniil_Penkin

0 votes

Hello @Shawn_Seo ,

You seem to be running your script in a Docker image that doesn't have git. You need to either install it earlier in the same script or switch to an alternative Docker image which has git preinstalled.

Hope this helps. Let me know if you have any questions.

Cheers,
Daniil

Yes, I'm using docker but as i said it's working basically but sometimes doesn't.

Why the docker image is inconsistent?

Docker image isn't. I believe that clone doesn't happen every time.

From this log excerpt:

- Installing kylekatarnls/update-helper (1.2.0): Downloading (connecting...) Downloading (0%) Failed to download kylekatarnls/update-helper from dist: Could not authenticate against github.com
Now trying to download from source
- Installing kylekatarnls/update-helper (1.2.0): Cloning 5786fa188e

It looks like it tries to download it from dist first. Can you check the log of successful pipeline and see if it was able to download the update-helper from dist and never fell back to cloning the source?

Cheers,
Daniil

Here is the log when it's ok.

+ composer update
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 29 installs, 49 updates, 0 removals
- Installing kylekatarnls/update-helper (1.2.0): Downloading (connecting...) Downloading (0%) Downloading (90%) Downloading (100%)
- Updating symfony/polyfill-mbstring (v1.10.0 => v1.14.0): Downloading (connecting...) Downloading (0%) Downloading Downloading Downloading (90%) Downloading (100%)

 

Thanks.

Like Daniil Penkin likes this

Cool, my assumption was correct: here it managed to download from dist, so didn't fall back to cloning the source and never called git.

Cheers,
Daniil

image: php:7.1.23

It's only today that we started receiving failures despite using the same image for months.

Successful (yesterday):

+ composer global require hirak/prestissimo
Changed current directory to /root/.composer
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Using version ^0.3.10 for hirak/prestissimo
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing hirak/prestissimo (0.3.10): Loading from cache
1/1: http://repo.packagist.org/p/provider-latest$15b09d866c540d0b58160e66d78f46682f52e0b87f019cc6300c049e2665c9cd.json
Finished: success: 1, skipped: 0, failure: 0, total: 1
Writing lock file
Generating autoload files

Fail (today):

+ composer global require hirak/prestissimo
Changed current directory to /root/.composer
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Using version ^0.3.10 for hirak/prestissimo
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing hirak/prestissimo (0.3.10): Downloading (connecting...) Downloading (0%) Failed to download hirak/prestissimo from dist: Could not authenticate against github.com
Now trying to download from source
- Installing hirak/prestissimo (0.3.10): Cloning fb6724d5ee

Installation failed, deleting ./composer.json.


[RuntimeException]
Failed to clone https://github.com/hirak/prestissimo.git, git was not found, check that it is installed and in your PATH env.

sh: 1: git: not found

require [--dev] [--prefer-source] [--prefer-dist] [--fixed] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

Fix is to install git but I want to know why bitbucket is having authentication issues with github?

Again, this has nothing to do with Bitbucket as such. The script is running inside of a specified Docker image.

Here's a recent blog post I found in Google, probably explains what is happening: Composer Based Continuous Integration (CI) Builds Failing Because of Github Rate Limiting

Cheers,
Daniil

Like cay89 likes this

it's working now. thanks.

Like Daniil Penkin likes this

Hi, I have the same problem since yesterday. I have read the suggested artice and it works again. Maybe Bitbucket need to write some message to all his customers in the form of alert, so everyone knows about the problem. We could't work since yesterday and this is a big loss for many companies because of this error.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

2,124 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you