Blog: VSTS

Use a private Azure DevOps/VSTS NuGet package feed with the .NET Core CLI

July 28, 2018, (updated on October 22, 2018), 1 comment, Software Development

If you have a .NET Core project which references a NuGet package from a private VSTS package feed, you cannot just build the project in CLI because you are not authorized to access the feed: When running dotnet restore, you’ll end up with this error message: error: Response status code does not indicate success: 401 (Unauthorized). To fix this problem, you can register the private NuGet feed with a VSTS personal access token (PAT). This article shows how to do that. 1. Create personal access token (PAT) on VSTS Navigate to your VSTS site, go to the “Security” settings (top […] Read more...

Tags: , , , ,

Script to clone all Git repositories from your VSTS collection

August 23, 2016, (updated on September 26, 2017), 11 comments, Software Development

In this article I show you a PowerShell script which clones and pulls all Git repositories from your Visual Studio Team Services (VSTS) collection. I use this script to retrieve the complete code base so that I can run my code analysis tools on it. 1. Create a new PowerShell script file In the directory where you want to clone all repositories, create a new CloneAllRepos.ps1 script file with the following contents: # Read configuration file Get-Content "CloneAllRepos.config" | foreach-object -begin {$h=@{}} -process { $k = [regex]::split($_,'='); if(($k[0].CompareTo("") -ne 0) -and ($k[0].StartsWith("[") -ne $True)) { $h.Add($k[0], $k[1]) } } $url […] Read more...

Tags: , ,

Migrate a TFS repository to a VSTS Git repository

February 17, 2016, (updated on February 25, 2016), Software Development

To migrate a TFS repository to a Visual Studio Team Services Git repository, just perform the following steps: Install the Git command line tools so that the tools are registered in the Windows command prompt Install the Windows package manager Chocolatey Install the command line tool git-tfs with Chocolatey: choco install gittfs Create a local directory for the new Git repository and set the command line’s currect directory to this directory Clone the TFS repository into the local directory: git tfs clone https://[TFSSERVER] $/[REPOSITORYPATH] . --ignore-branches --debug Optionally add .gitignore and .gitattributes files to your Git repository Add the VSO […] Read more...

Tags: , , , , ,


  Page 1 of 1