I have been getting a fatal error when running a github action to deploy updates to an AWS EC2. The github action has been running with no error until the PAT expired and I generated a new one and updated the secrets ACCESS_TOKEN
of the repo.
Here's the fatal error
err: fatal: could not read Password for 'https://***@github.com': No such device or address
Github action
name: UAT Integrationrun-name: Code integration by @${{ github.actor }}on: push: branches: - uatjobs: integration-test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Configure PHP 8.1 uses: shivammathur/setup-php@master with: php-version: 8.1 - name: Copy .env run: php -r "file_exists('.env') || copy('.env.example', '.env');" - name: Install Composer Dependencies run: composer install --no-dev --no-interaction --prefer-dist - name: Generate key run: php artisan key:generate - name: Directory Permissions run: chmod -R 777 storage bootstrap/cache deploy: name: Deploy to UAT needs: integration-test runs-on: ubuntu-latest steps: - name: Checkout Code uses: actions/checkout@v2 - name: Deploy to EC2 instance uses: appleboy/ssh-action@master with: host: ${{ secrets.EC2_HOST }} username: ${{ secrets.EC2_USERNAME }} key: ${{ secrets.SSH_PRIVATE_KEY }} envs: ACCESS_TOKEN script: | cd /var/www/html/ git config --global url."https://${{ secrets.ACCESS_TOKEN }}@github.com/".insteadOf "https://github.com/" git pull composer install php artisan migrate --seed sudo chown -R www-data:www-data .