Skip to content

adk deploy cloud_run error- Deploy failed: [WinError 5] Access is denied, Win 11,Google Cloud SDK Shell #999

Closed

Description

@RoadRun553

I have Windows 11. Trying to execute adk deploy cloud_run in Google Cloud SDK Shell under Admin mode, but getting below error I have disabled Norton antivirus & firewall. Stopped one drive which was running in back ground.

TryinI was following guidelines in https://google.github.io/adk-docs/deploy/cloud-run/#setup-environment-variables

Received below error, tried in C: drive, deleted and re created the temp folder in C:. Then I moved execution to D: drive and created a temp folder there. Still getting error

(.venv_agentspace) C:\OneDrive\Desktop\agentspace>adk deploy cloud_run ^
More? --project=%GOOGLE_CLOUD_PROJECT% ^
More? --region=%GOOGLE_CLOUD_LOCATION% ^
More? --verbosity debug ^
More? %AGENT_PATH%
Start generating Cloud Run source files in C:\Users\Mindful Owner\AppData\Local\Temp\cloud_run_deploy_src\20250529_061435
Copying agent source code...
Copying agent source code complete.
Creating Dockerfile...
Creating Dockerfile complete: C:\Users\Mindful Owner\AppData\Local\Temp\cloud_run_deploy_src\20250529_061435\Dockerfile
Deploying to Cloud Run...
Cleaning up the temp folder: C:\Users\Mindful Owner\AppData\Local\Temp\cloud_run_deploy_src\20250529_061435
Deploy failed: [WinError 5] Access is denied: 'C:\Users\Mindful Owner\AppData\Local\Temp\cloud_run_deploy_src\20250529_061435\agents\capital_agent'

Can someone help on this ?

Activity

  1. added
    core
    on May 29, 2025
  2. added theissue type on May 29, 2025
  3. msamon-nrg commented on May 30, 2025

    @msamon-nrg

    I receive the same error message even when specifying a temp folder in the same directory. I am on Windows 11 using Powershell and package version google-adk==1.1.1

    adk deploy cloud_run `
        --project=$env:GOOGLE_CLOUD_PROJECT `
        --region=$env:GOOGLE_CLOUD_LOCATION `
        --service_name=$env:SERVICE_NAME `
        --app_name=$env:APP_NAME `
        --with_ui `
        --temp_folder=./temp `
        $env:AGENT_PATH

    Output:

    Start generating Cloud Run source files in temp
    Removing existing files
    Deploy failed: [WinError 5] Access is denied: 'temp'
  4. RoadRun553 commented on May 30, 2025

    @RoadRun553
    Author

    @msamon-nrg I tried using default "temp" folder and custom "temp" folder. Still was getting same error every time

  5. riquelmy commented on Jun 10, 2025

    @riquelmy

    Any update for this matter?

  6. pentium10 commented on Aug 3, 2025

    @pentium10

    I have the same error. So definetly something is broken

    Creating Dockerfile...
    Creating Dockerfile complete: C:\Users\xxxx\AppData\Local\Temp\cloud_run_deploy_src\20250803_152512\Dockerfile
    Deploying to Cloud Run...
    Cleaning up the temp folder: C:\Users\xxxx\AppData\Local\Temp\cloud_run_deploy_src\20250803_152512
    Deploy failed: [WinError 2] The system cannot find the file specified
    
  7. added this to the 08/11 FixIt Week milestone on Aug 8, 2025
  8. Jacksunwei commented on Aug 12, 2025

    @Jacksunwei
    Collaborator

    Sorry, we currently don't have bandwidth to work on window-specific support. If anyone can help this, feel free to send us PR.

  9. added
    help wanted
    and removed
    core
    on Aug 25, 2025
  10. saulomon28 commented on Oct 6, 2025

    @saulomon28

    Any update for this problem?

  11. hangfei commented on Oct 27, 2025

    @hangfei
    Collaborator

    merge to main issue and closing this one.

  12. mahdin75 commented on Nov 19, 2025

    @mahdin75

    Hi,

    I installed the latest version (1.18.0) and faced the same issue.

    How can I fix it?

  13. saulomon28 commented on Nov 22, 2025

    @saulomon28

    @mahdin75 I use bash to deploy on Windows, and it works perfectly for me on both macOS and Windows. I hope this helps.

  14. mahdin75 commented on Nov 24, 2025

    @mahdin75

    I checked the google cloud log explorer and found this error during the deploy.

    rm: cannot remove './user_code/gcloud_agent_tmp20251124_154042/initi.py': Permission denied

    How can I fix it?

  15. saulomon28 commented on Nov 24, 2025

    @saulomon28

    I haven't found a way to solve it other than creating a Bash script :/

  16. racasado commented on Jan 5, 2026

    @racasado

    I am getting this error also. I think it can be related to Onedrive. However, I have tried to use a temp directory outside Onedrive.

    I have tried with Powershell and with Bash

    Does anyone know how to solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

help wanted

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions