0

I am using Windows OS and Github as repository. I want to add Remote repository using Git command in buildspec file. My command is git remote add origin https://github.com/moodysanalytics/maks-bc-fdeexcelwrapper. I am getting error "The term 'git' is not recognized as the name of a cmdlet"

version: 0.2

phases:
     install:
           commands:

                   - git remote add origin <My Repository>

I installed Git using chocolatey. Still I am getting same error.

version: 0.2

phases:
    install:
        commands:
        - Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
    - Write-Host $Env:Path
    - C:\ProgramData\chocolatey\bin\choco.exe install -y git.install
    - Write-Host $Env:Path
    - setx PATH "$env:Path;C:\Program Files\Git\bin\"              
    - setx PATH "$env:Path;$Env:Path + ;C:\Program Files\Git\cmd\"
    - Write-Host $Env:Path
    - git remote add origin <MyRepo>
Gobind
  • 588
  • 1
  • 7
  • 18

0 Answers0