Import package from Azure DevOps repository

Hi ! 👋 I'm trying to import a private package from Azure DevOps Git repository. I can't make it work. Anyone has tried that before? I've seen the Github example with PAT and Azure DevOps is using a PAT as well.
DAHDeno AI Helper3/22/2024
Hello! 👋 To import a private package from an Azure DevOps Git repository, you can use a Personal Access Token (PAT) similar to how you would with GitHub. The documentation mentions that Deno supports sending bearer tokens when requesting remote modules, which are broadly supported by hosting services like GitHub, GitLab, Bitbucket, and others. Although Azure DevOps is not explicitly mentioned, the process should be similar. Here's what you need to do: 1. Generate a Personal Access Token (PAT) in Azure DevOps with the appropriate permissions to access the repository. 2. Set the DENO_AUTH_TOKENS environment variable with your PAT and the Azure DevOps repository URL. The format for the DENO_AUTH_TOKENS environment variable is as follows:


Replace your_pat with the PAT you generated and adjust the hostname (dev.azure.com) if necessary to match your Azure DevOps domain. 3. When you import the package in your Deno code, use the full URL to the package in the Azure DevOps repository. Deno will use the PAT provided in the DENO_AUTH_TOKENS environment variable to authenticate the request. Remember to keep your PAT secure and do not commit it to your source code. You may want to use environment variables or secret management tools to handle the PAT securely. If you encounter any issues, make sure that the PAT has the correct scope for accessing the repository and that the URL to the package is correct. 🦕
It isn't possible. Wrong information here... Sad to be answered by a bot 😦
Why? It should work. See the documentation: https://docs.deno.com/runtime/manual/basics/modules/private
Private Modules and Repositories | Deno Docs
There may be instances where you want to load a remote module that is located in
Okay, I was curious and tried it with Gitlab (don't have access to an Azure DevOps) and also failed.
GSGDream Studio3/28/2024
I could only make it work with Github. I think it's linked to how Azure DevOps manages raw content. Unlike Github, which uses https://raw.githubusercontent.com/username/repository/branch/filename, Azure DevOps uses URL query parameters to point to the right file. @rbetts Sorry to ping you. Do you have any information about this subject?
I had recently the same issue. Couldn't find a solution. I was expecting that by setting the npm registry and the PAT with DENO_AUTH_TOKENS to work. No luck! Might be related with the URL generated by Deno to download the package vs. the URL npm is using. As a work around, I had to use npm install for npm packages, which is not ideal.
why would it be wrong? this is the the way we are using BitBucket's api just to pull everything we need using the what the bot posted

Looking for more? Join the community!

Recommended Posts
Help with deploymentHow to use Tailwind css plugins in FRESH?is it possible to use tailwind css plugins in Fresh project? if it is, how?What am I missing when conditionally styling SVGsSo I have a SVG of an arrow that only has a stroke color. I want to change this stroke color based oError in npm package - how to squelch?I'm using an npm package that I think isn't being processed for Deno correctly. I get this error: `Is there a way to handle subpath imports within a library?I'm trying to convert a library package to work with deno. Internally, the package makes a bunch ofHow to connect to a MySQL 5.0.24?I was trying to use mysql@v2.12.1 to connect to a MySQL 5.0.24 Server but it is not compatible, is tTips for deploying Deno locally?Do we have a best practice for this? I want to deploy to my LAN only for a particular site. Maybe juHow to know when a Deno.Conn is closedA `Deno.Conn` is created either with `Deno.connectTls` or `Deno.connect`. How do we detect when the readFile path not foundI'm trying to use Deno.readFile but when is execute i get an error about wrong path. The files are Is there a way to read big files using something like .seek but with ending position as well?So, I'm doing a version of the billion line challenge in JS. I've already implemented a version withesbuild-deno-loader with npm private registryDid anyone used the esbuild-deno-loader with npm: specifier while using a private npm registry that how to load env variables from .env file in taskthe `source` shell command is not available. I tried ``` "tasks": { "my-task": "export .env &&Is there a way to specify a range and list from KV?```typescript const kv = await Deno.openKv(); kv.set(["parent", 1], "key1") kv.set(["parent", 2], "kPermissionDenied while using ioredis npm packageHello, I'm facing an issue with an npm library ioredis (https://github.com/redis/ioredis). For someIs there a way to obtain Deno.cron schedule info?Deploy lists the registered cron jobs with name, schedule, last run and next run. Is there a programVisual Studio Code Deno does not use node typesI'm trying to use the "esquery" node library with its types, but for any reason Deno ignores the typDrop permissionsI'd like to harden my deno app a bit, but specifying permissions manually gets repetitive. Is there New fresh project comes out of the box with errorsI created a new fresh project on linux, I am using VsCode and im getting many errors although the prIs there a deno function for inputting prompt reply without pressing enter?Normally, one has to press enter for the input to be accepted. I was wondering if there was a versioSetting Deno.Command priority and affinity (on windows)Is it possible to set a tasks / commands priority and affinity directly? Code: ```ts await new Deno