Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PAT is pass in url rather than in Authorization header : not working on Azure Devops Server #84

Closed
mgodlewski opened this issue Nov 16, 2020 · 3 comments

Comments

@mgodlewski
Copy link

mgodlewski commented Nov 16, 2020

Environment Details

  • Pipeline

    • [*] Build
  • Agent OS

    • [*] Windows
  • Mirror Task Configuration

    • Mirror Git Repo Task version: 1.1.12
    • Mirror Source Repo System
      • [*] Azure DevOps Server (formerly TFS) v Dev18.M170.6

Description

The clone is not working since the PAT is added in the repo url (https://myPAT@server/repository.git) and not as a Authorization header (-c http.extraHeader="Authorization: Basic $B64Pat"), like described in the documentation : https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=preview-page#use-a-pat

Log Output

Starting: Mirror Git Repository to Gitlab OAB
==============================================================================
Task         : Mirror Git Repository
Description  : A straightforward utility to mirror one Git repository to another location
Version      : 1.1.12
Author       : Swellaby
Help         : [More Information](https://github.com/swellaby/vsts-mirror-git-repository)
==============================================================================
/usr/local/bin/git -c http.sslVerify=true clone --mirror https://myPAT@server/repository.git
Clonage dans le dépôt nu 'repository.git'
fatal: could not read Password for 'https://myPAT@server/repository.git': terminal prompts disabled
##[error]Error: The process '/usr/local/bin/git' failed with exit code 128
Finishing: Mirror Git Repository to another repo
@calebcartwright
Copy link
Member

Thanks for reaching out @mgodlewski, what version of AzDo Server are you using, 2019?

@mgodlewski
Copy link
Author

The version of AzDo Server is "Dev18.M170.6"

@calebcartwright
Copy link
Member

Thanks, best we can tell, Microsoft silently dropped support for auth in the userinfo subcomponent on the URI in newer versions of Server which is most likely what you're running into there.

Going to close this in favor of #86 and #85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants