Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: yaml.scanner.ScannerError: mapping values are not allowed here (new issue) #134

Closed
Grommish opened this issue Apr 8, 2022 · 2 comments · Fixed by #135
Closed

Comments

@Grommish
Copy link
Contributor

Grommish commented Apr 8, 2022

Similar to #129

BW_VERSION="$(curl --silent https://raw.githubusercontent.com/bitwarden/self-host/master/bitwarden.sh | grep 'COREVERSION="' | sed 's/^[^"]*"//; s/".*//')"
returns an empty string.

The https://raw.githubusercontent.com/bitwarden/self-host/master/bitwarden.sh script, BW_VERSION in bitwarden.sh calls
curl -sL https://go.btwrdn.co/bw-sh-versions | grep '^ *"'${1}'":' | awk -F\: '{ print $2 }' | sed -e 's/,$//' -e 's/^"//' -e 's/"$//'
which returns empty, as bitwarden.sh now uses
COREVERSION=$(getVersion coreVersion)

https://github.com/bitwarden/self-host/blob/master/bitwarden.sh#L49

SCRIPTS_DIR="$OUTPUT/scripts"
BITWARDEN_SCRIPT_URL="https://go.btwrdn.co/bw-sh"
RUN_SCRIPT_URL="https://go.btwrdn.co/bw-sh-run"
VERSION_ENDPOINT="https://go.btwrdn.co/bw-sh-versions"

# Please do not create pull requests modifying the version numbers.
function getVersion() {
    echo $(curl -sL $VERSION_ENDPOINT | grep  '^ *"'${1}'":' | awk -F\: '{ print $2 }' | sed -e 's/,$//' -e 's/^"//' -e 's/"$//')
}

https://go.btwrdn.co/bw-sh-versions redirects to https://raw.githubusercontent.com/bitwarden/self-host/master/version.json

which currently returns:

{
  "versions": {
      "coreVersion":"1.47.1",
      "webVersion":"2.27.0",
      "keyConnectorVersion":"1.0.1"
  }
}

returns an empty string, which means no version number is populated and causes the ScannerError as bitwarden/bwdata/docker/docker-compose.override.yml shows

version: '3'

services:
  api:
    image: bitbetter/api:

  identity:
    image: bitbetter/identity:
@Grommish
Copy link
Contributor Author

Grommish commented Apr 8, 2022

Reusing the code in bitwarden.sh provides the correct coreVersion, and produces the followng

version: '3'

services:
  api:
    image: bitbetter/api:1.47.1

  identity:
    image: bitbetter/identity:1.47.1
VERSION_ENDPOINT="https://go.btwrdn.co/bw-sh-versions"

# Please do not create pull requests modifying the version numbers.
function getVersion() {
    echo $(curl -sL $VERSION_ENDPOINT | grep  '^ *"'${1}'":' | awk -F\: '{ print $2 }' | sed -e 's/,$//' -e 's/^"//' -e 's/"$//')
}

BW_VERSION=$(getVersion coreVersion)

But I still am getting errors

ERROR: for identity  pull access denied for bitbetter/identity, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

ERROR: for api  pull access denied for bitbetter/api, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
ERROR: pull access denied for bitbetter/api, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

@Ayitaka
Copy link
Contributor

Ayitaka commented Apr 8, 2022

BW_VERSION=$(curl -sL https://go.btwrdn.co/bw-sh-versions | grep '^ *"'coreVersion'":' | awk -F\: '{ print $2 }' | sed -e 's/,$//' -e 's/^"//' -e 's/"$//')

(Edit) Requires changes to:
https://github.com/jakeswenson/BitBetter/blob/master/build.sh
https://github.com/jakeswenson/BitBetter/blob/master/update-bitwarden.sh

Grommish added a commit to Grommish/BitBetter that referenced this issue Apr 8, 2022
Bitwarden has changed the way they report version numbers for
self-hosted installations.

Fixes jakeswenson#134

Credit to @Ayitaka for the fix

Tested and Verified, Updated install to 1.47.1

Signed-off-by: Donald Hoskins <grommish@gmail.com>
@Grommish Grommish closed this as completed Apr 8, 2022
jakeswenson pushed a commit that referenced this issue Apr 9, 2022
* BitBetter: update build.sh / update-bitwarden.sh

Bitwarden has changed the way they report version numbers for
self-hosted installations.

Fixes #134

Credit to @Ayitaka for the fix

Tested and Verified, Updated install to 1.47.1

Signed-off-by: Donald Hoskins <grommish@gmail.com>

* Update build.sh

Remove extraneous comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants