Sync Azure Devops Repo

less than 1 minute read

Description:

So I will eventually be moving from Github to Azure Devops but first I wanted to see about using just Azure Repo so I had a test project created and tried to sync it to my machine with VScode. Here are the steps:

To Resolve:

  1. First create a project called TEST and a repo called TEST. Then go create a token by clicking generate credentials.

  2. As usual just do:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    
    cd c:\scripts\devops-test
    git init .
    git config --local user.name 'Gerry'
    git config --local user.email 'gerry@domain.com'
    New-Item -itemtype File -Name "myfile.txt"
    git add --all
    git commit -m 'first'
    git remote add origin https://test@dev.azure.com/test/_git/test
    git push -u origin --all
    
  3. Enter your credentials when prompted. Be advised I got an error Error: 'security token doesn't have enough privledges..' and the fix was to go back to the project and make my user an Administrator of the project.

Comments