bitbucket icon indicating copy to clipboard operation
bitbucket copied to clipboard

Could not build, something is wrong with download URL

Open TheCelavi opened this issue 4 years ago • 5 comments

Output which I get is this one:

ERROR: Service 'bitbucket' failed to build: The command '/bin/sh -c mkdir -p ${BITBUCKET_BACKUP_CLIENT_HOME} && wget -O /tmp/bitbucket-backup-distribution.zip https://marketplace.atlassian.com/download/plugins/com.atlassian.stash.backup.client/version/${BITBUCKET_BACKUP_CLIENT_VERSION} && unzip -d ${BITBUCKET_BACKUP_CLIENT_HOME} /tmp/bitbucket-backup-distribution.zip && mv /opt/backupclient/$(ls /opt/backupclient/) /opt/backupclient/bitbucket-backup-client && chown -R bitbucket:bitbucket ${BITBUCKET_BACKUP_CLIENT_HOME}' returned a non-zero code: 8

What is correct value for BITBUCKET_BACKUP_CLIENT_VERSION?

Thanks!

TheCelavi avatar Jun 22 '20 15:06 TheCelavi

Yeah, I am getting this:

Resolving d34y9yt11qeow3.cloudfront.net (d34y9yt11qeow3.cloudfront.net)... 13.226.156.179, 13.226.156.153, 13.226.156.229, ... Connecting to d34y9yt11qeow3.cloudfront.net (d34y9yt11qeow3.cloudfront.net)|13.226.156.179|:443... connected. HTTP request sent, awaiting response... 403 Forbidden 2020-06-22 15:38:13 ERROR 403: Forbidden.

TheCelavi avatar Jun 22 '20 15:06 TheCelavi

+1 I'm getting the same error. I tried manually download using wget command in the terminal, it was able to download with no problem, so this means the url is not broken. It has to be something else

CatDTran avatar Jun 29 '20 21:06 CatDTran

Atlassian has changed the download url. The version of the program is still the same.

The new download URL should be:

https://marketplace.atlassian.com/download/apps/1211500/version/${BITBUCKET_BACKUP_CLIENT_VERSION}

blacklabelops avatar Jun 30 '20 06:06 blacklabelops

I had a similar issue with wget, but I don't remember the exact error message. In case it does help, the fix for me was to tell wget to expect UTF-8. This was an issue due to the number of redirects, and eventually I guess one of the redirect URLs fails to convert from ASCII to UTF-8, or vice versa, not sure.

https://github.com/david-drinn/bitbucket/commit/80e40e806119fbdd0fa2d5a902201454345d7894

Add --local-encoding=utf-8 to the wget command in the following RUN step of the Dockerfile.

RUN mkdir -p ${BITBUCKET_BACKUP_CLIENT_HOME} && \
    wget -O /tmp/bitbucket-backup-distribution.zip \
      --local-encoding=utf-8 \
      https://marketplace.atlassian.com/download/plugins/com.atlassian.stash.backup.client/version/${BITBUCKET_BACKUP_CLIENT_VERSION} && \
    unzip -d ${BITBUCKET_BACKUP_CLIENT_HOME} /tmp/bitbucket-backup-distribution.zip && \
    mv /opt/backupclient/$(ls /opt/backupclient/) /opt/backupclient/bitbucket-backup-client && \

david-drinn avatar Oct 27 '20 17:10 david-drinn

+1 I'm getting the same error. I tried manually download using wget command in the terminal, it was able to download with no problem, so what should be done?

lvbaocheng avatar Dec 15 '20 09:12 lvbaocheng