I have a Git repo on Azure DevOps and I am trying to fetch the origin/main branch. However, the command failed with Bash existed code 128.
fatal: could not read Username for 'https://xxx.xxx.com': terminal prompts disabled ##[error]Bash exited with code '128'.
This is my release pipeline definition:
# Release pipeline
pr: none
trigger: none
variables:
vmImageName: 'ubuntu-latest'
pool:
vmImage: $(vmImageName)
jobs:
- job: release
workspace:
clean: all
steps:
# Install Node
- task: NodeTool@0
inputs:
versionSpec: '16.14.x'
displayName: 'Use node 16.14.x'
# Authenticate private VivaCommonUX feed packages
- task: npmAuthenticate@0
displayName: 'npm Authenticate .npmrc'
inputs:
workingFile: .npmrc
# Install Yarn package manager
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
inputs:
versionSpec: '1.22.x'
displayName: 'Use Yarn 1.22.x'
# Check Node, NPM, Yarn version
- script: |
echo "Node Version: "
node -v
echo "NPM Version: "
npm -v
echoe "Yarn Version: "
yarn -v
displayName: 'Check Node, NPM, Yarn version'
- script: |
git fetch -- origin main
displayName: 'fetch origin main'
The reason why I did git fetch -- origin main is to debug the issue. It performs a git fetch -- origin main under the hood.
Any reason why this happens?