相关疑难解决方法(0)

Azure管道:我越来越致命:无法读取“ https://github.com”的用户名:终端提示已禁用

我在azure构建管道中配置了powershell任务,以将来自dev的更改合并到我的github公共仓库的master中,并将更改推送到master。我正进入(状态

严重:无法读取“ https://github.com ”的用户名:禁用终端提示

注意:

  • 我已经用我的用户名和emailid配置了gitconfig。
  • 当我在文件中进行修改并提交并推送时,git push正常工作,但是当我合并并推送时会抛出此错误
  • 我有足够的特权来推动分支

任何帮助,将不胜感激。如果需要更多信息,请在此线程中进行注释。

这是实际的代码段。

$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

6
推荐指数
3
解决办法
2367
查看次数

使用托管代理对管道进行 Git 子模块更新

我有一个自托管代理,并且有一个带有子模块的 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)

git-submodules azure-devops azure-devops-self-hosted-agent

3
推荐指数
1
解决办法
3302
查看次数