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

Permission denied error #66

Closed
erfannariman opened this issue Mar 14, 2021 · 0 comments
Closed

Permission denied error #66

erfannariman opened this issue Mar 14, 2021 · 0 comments

Comments

@erfannariman
Copy link

I tried the proposed blog method and I run into an error I am not sure how to solve:

  with:
    name: sampling-app
    path: .
  env:
    AZURE_WEBAPP_NAME: sampling-app
    AZURE_WEBAPP_PACKAGE_PATH: .
    RESOURCE_GROUP: zypp-general
    PYTHON_VERSION: 3.8
    pythonLocation: /opt/hostedtoolcache/Python/3.8.8/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.8/x64/lib
Starting download for sampling-app
Directory structure has been setup for the artifact
Total number of files that will be downloaded: 2000
events.js:187
      throw er; // Unhandled 'error' event
      ^

Error: EACCES: permission denied, open '/home/runner/work/sampling-app/sampling-app/.git/objects/pack/pack-acef06006e22da059b09e712a877695fbd811483.idx'
Emitted 'error' event on WriteStream instance at:
    at internal/fs/streams.js:294:12
    at FSReqCallback.oncomplete (fs.js:146:23) {
  errno: -13,
  code: 'EACCES',
  syscall: 'open',
  path: '/home/runner/work/sampling-app/sampling-app/.git/objects/pack/pack-acef06006e22da059b09e712a877695fbd811483.idx'
}

here is my YAML:

name: Build and deploy Sampling App

on:
  push:
    branches:
      - main

env:
  WEBAPP_NAME: 'sampling-app'
  RESOURCE_GROUP: 'zypp-general'
  PYTHON_VERSION: '3.8' # supports 3.6, 3.7, 3.8)

jobs:
  build-and-test:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Setup Python ${{ env.PYTHON_VERSION }} Environment
      uses: actions/setup-python@v2
      with:
        python-version: ${{ env.PYTHON_VERSION }}

    - name: Create and start virtual environment
      run: |
        python3 -m venv venv
        source venv/bin/activate
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        git config --global url."https://${{ secrets.ACCESS_TOKEN }}@github".insteadOf https://github
        pip install -r requirements.txt

    - name: Upload artifact for deployment jobs
      uses: actions/upload-artifact@v2
      with:
        name: ${{ env.AZURE_WEBAPP_NAME }}
        path: |
          .
          !venv/

  deploy-to-webapp:
    needs: build-and-test
    runs-on: ubuntu-latest

    steps:
      - uses: actions/download-artifact@v2
        with:
          name: ${{ env.AZURE_WEBAPP_NAME }}
          path: .

      - name: Log in to Azure CLI
        uses: azure/login@v1
        with:
          creds: ${{ secrets.AZURE_SERVICE_PRINCIPAL }}

      - name: Configure deployment and runtime settings on the webapp
        run: |
          az configure --defaults ${{ env.RESOURCE_GROUP }}
          az webapp config appsettings --name ${{ env.AZURE_WEBAPP_NAME }} --settings \
              SCM_DO_BUILD_DURING_DEPLOYMENT=true \
              FLASK_ENV=production
          az webapp config set --name ${{ env.AZURE_WEBAPP_NAME }} \
            --startup-file "gunicorn --bind=0.0.0.0 --timeout 600 app:app"
      - name: Deploy to App Service
        uses: azure/webapps-deploy@v2
        with:
          app-name: ${{ env.AZURE_WEBAPP_NAME}}

Is there anything I am doing wrong here? The error is hard for me to understand. Seems like a permission thing on folder level?

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

No branches or pull requests

1 participant