laravel / nova-issues

554 stars 34 forks source link

Laravel Nova Auth with nova.laravel.com not work with some passwords #1878

Closed abkrim closed 5 years ago

abkrim commented 5 years ago

Description

After many laps I had the feeling that something had to do with the password of my Nova user. I did a lot of tests and in the end it turned out to work by changing the password to a password without extended characters.

Also say that with documentation in hand, it fails when used with Gitlab CI

Steps To Reproduce

With the extended password (already changed QHnfbpk ~ $ / M0) I got this error

- Installing laravel/nova (v2.1.1): Downloading    Failed to download laravel/nova from dist: The 'https://nova.laravel.com/dist/laravel/nova/laravel-nova-1a3788eeba04c3627b772ab0a35bcb26b1f928d9-zip-74981f.zip' URL could not be accessed: HTTP/1.1 403 Forbidden

My .gitlab-ci.yml

composer:
  stage: preparation
  services:
    - {name: 'abkrim/mysql8_legacy_password', alias: 'mysql'}
  image: edbizarro/gitlab-ci-pipeline-php:7.3-alpine
  script:
    - php -v
    - composer config http-basic.nova.laravel.com "$NOVA_USERNAME" "$NOVA_PASSWORD"
    - composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts
    - cp .env.example .env
    - php artisan key:generate
  artifacts:
    paths:
      - vendor/
      - .env
    expire_in: 5 days
    when: always
  cache:
    paths:
      - vendor/

After change password fo one without extended characters fail with same message.

I use a tip for write auth.json with echo

script:
    - php -v
    - echo "{\"http-basic\":{\"nova.laravel.com\":{\"username\":\"${NOVA_USERNAME}\",\"password\":\"${NOVA_PASSWORD}\"}}}" > ~/.composer/auth.json
    - ls -lisah ~ && ls -lisah ~/.composer/
    - cat ~/.composer/auth.json
    - composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts
    - cp .env.example .env
    - php artisan key:generate

I put ls and cat for verify data.... and now work fine.

  - Installing doctrine/dbal (v2.9.2): Loading from cache
  - Installing cakephp/chronos (1.2.8): Loading from cache
  - Installing laravel/nova (v2.1.1): Downloading (100%)
jbrooksuk commented 5 years ago

This is not a Nova issue :)