denoland / denoland/deploy_feedback

[Bug]: Getting 404 error when trying to deploy a function that uses packages from a private repository.

Open
#372 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
79
Forks
5
PR merge metrics
No merged PRs in 30d

Description

### Problem description

When trying to deploy an application that uses a module that is in a private github repository, deploy always fails even with the variables "**DENO_AUTH_TOKENS**" registered correctly.

Error:
![image](https://user-images.githubusercontent.com/37317374/235336838-83efbb3a-685a-4243-8ca6-0b9c1ec8d65a.png)

**Secreted Created on Github:**
![image](https://user-images.githubusercontent.com/37317374/235336737-3ce1da45-4b68-4264-bb5f-b5c1c5a49e0a.png)

**Secret Created on DenoDeploy**
![image](https://user-images.githubusercontent.com/37317374/235336761-bb421187-21d6-48a2-a88b-b8b903fab7eb.png)

**The content of the registered variable is the following:**
```
MY_PAT_TOKEN_HERE@raw.githubusercontent.com
```

I already tested it, and locally on my machine I can use a variable with that same content normally.

**Github Action:**
```yaml
name: Deploy

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
permissions:
id-token: write # Needed for auth with Deno Deploy
contents: read # Needed to clone the repository

steps:
- name: Clone repository
uses: actions/checkout@v3

# Just a workarround try, no success.
- name: Export DENO_AUTH_TOKENS secret to env
run: echo "export DENO_AUTH_TOKENS=${{ secrets.DENO_AUTH_TOKENS }}" >> ~/.bashrc && source ~/.bashrc

- name: Upload to Deno Deploy
uses: denoland/deployctl@v1
with:
project: "xxx-project-name"
entrypoint: "./server.ts"
```

### Steps to reproduce

1. Have a project that makes use of a deno library that is private on your github.
2. Create a personal access token and register the **DENO AUTH TOKENS** variable using the format suggested in the documentation:
**TOKEN_HERE@raw.githubusercontent.com**
3. Test locally on your machine to validate that your variable is correct and the token works.
4. Register this same variable in the Deno Deploy Environment Variables Panel and in Github Actions.
5. Try to do a deploy.

### Expected behavior

It was expected that he would be able to use the registered environment variable and the deploy would be successful.

### Environment

deno 1.33.1 (release, x86_64-pc-windows-msvc)
v8 11.4.183.1
typescript 5.0.3

### Possible solution

You can pass this token as a parameter during deploy, it would make things easier.

### Additional context

![image](https://user-images.githubusercontent.com/37317374/235337215-466926c1-adbd-47a3-8252-bf28c79b63be.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.