我在azure构建管道中配置了powershell任务,以将来自dev的更改合并到我的github公共仓库的master中,并将更改推送到master。我正进入(状态
严重:无法读取“ https://github.com ”的用户名:禁用终端提示
注意:
任何帮助,将不胜感激。如果需要更多信息,请在此线程中进行注释。
这是实际的代码段。
$branchName = $env:BRANCH_NAME;
Write-Host "Getting SHA for last commit in the latest release" -ForegroundColor Blue;
$latestReleaseCommitSHA = git rev-list --tags --max-count=1;
if([string]::IsNullOrEmpty($latestReleaseCommitSHA)) {
Write-Host "Unable to get the SHA for last commit in latest release" -ForegroundColor Red;
EXIT 1;
}
Write-Host "SHA for last commit in the latest release is '$($latestReleaseCommitSHA)'" -ForegroundColor Green;
Write-Host "Merging Changes till '$($latestReleaseCommitSHA)'" -ForegroundColor Blue;
git merge $latestReleaseCommitSHA
Write-Host "Checking Conflicted Files";
$conflictedFiles = …Run Code Online (Sandbox Code Playgroud) git powershell azure-devops azure-pipelines-build-task azure-pipelines
我有一个自托管代理,并且有一个带有子模块的 git 存储库。.gitmodules 中的 URL 是http://
当我尝试初始化作业时,它无法更新子模块。
git submodule sync
git submodule update --init --force
Cloning into 'foo-dev-common'...
Submodule 'foo-dev-common' (https://MY_ORG@dev.azure.com/MY_ORG/PInC/_git/foo-dev-common) registered for path 'foo-dev-common'
fatal: could not read Password for 'https://MY_ORG@dev.azure.com': terminal prompts disabled
fatal: clone of 'https://MY_ORG@dev.azure.com/MY_ORG/PInC/_git/foo-dev-common' into submodule path 'foo-dev-common' failed
##[error]Git submodule update failed with exit code: 128
Finishing: Checkout foo-rose-identity-service@submod_bd_mahesh to s/foo-rose-identity-service
Run Code Online (Sandbox Code Playgroud)
我也尝试过添加存储库 self 和
steps:
- checkout: self
submodules: true
persistCredentials: true
Run Code Online (Sandbox Code Playgroud)