Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Error when trying to fetch tag #3

Open
voguhl opened this issue Oct 19, 2018 · 3 comments
Open

Error when trying to fetch tag #3

voguhl opened this issue Oct 19, 2018 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@voguhl
Copy link

voguhl commented Oct 19, 2018

I am trying to fetch tag that is labeled V6.1.2.2.

The extension does that but throws a warning, resulting in the whole step to fail.

In the textbox that is labeled Branch/Tag i entered V6.1.2.2

Here is the log:

==============================================================================
Task         : Git Repository Downloader
Description  : Download additional git repository from public repository or this TFS
Version      : 0.3.3
Author       : Fakhrulhilal Maktum
Help         : [More information](https://github.com/fakhrulhilal/TFSGitDownloader/blob/master/README.md)
==============================================================================
Preparing task execution handler.
Executing the powershell script: D:\a\mystuff\_tasks\GitDownloader_56033f91-aeb8-4316-b19a-bcb721f4705b\0.3.3\Save-GitRepository.ps1




Updating repository inside D:\a\git\mystuff



System.Management.Automation.RemoteException: warning: tag 'refs/tags/V6.1.2.2' is really 'V6.1.2.2' here
git add .
        git stash


No local changes to save
Undoing any pending changes in D:\a\git\mystuff


git checkout V6.1.2.2
            git checkout -- .
            git clean -fdx


HEAD is now at e99fed7... Merged PR 396: v1.2(.2) update
Pulling update from branch/tag V6.1.2.2


git config credential.interactive never


git -c http.extraheader="Authorization: bearer ********" pull origin V6.1.2.2


From http://mystuff/mystuff/mystuff/_git/mystuff
 * tag               V6.1.2.2   -> FETCH_HEAD

Already up-to-date.

PowerShell script completed with 1 errors.
@fakhrulhilal
Copy link
Owner

fakhrulhilal commented Oct 23, 2018

I tried using agent v2.140.2 without error. Can you tell me the agent version you're using? And the powershell version/OS version will be helpful.

This is my full log

2018-10-23T04:00:41.8729804Z ##[section]Starting: Fetch git: https://github.com/fakhrulhilal/ResharperMacro.git
2018-10-23T04:00:41.8729804Z ==============================================================================
2018-10-23T04:00:41.8729804Z Task         : Git Repository Downloader
2018-10-23T04:00:41.8729804Z Description  : Download additional git repository from public repository or this TFS
2018-10-23T04:00:41.8729804Z Version      : 0.3.3
2018-10-23T04:00:41.8729804Z Author       : Fakhrulhilal Maktum
2018-10-23T04:00:41.8729804Z Help         : [More information](https://github.com/fakhrulhilal/TFSGitDownloader/blob/master/README.md)
2018-10-23T04:00:41.8729804Z ==============================================================================
2018-10-23T04:00:41.8739805Z Preparing task execution handler.
2018-10-23T04:00:42.0720003Z Executing the powershell script: D:\Temp\vsts\ado\_tasks\GitDownloader_56033f91-aeb8-4316-b19a-bcb721f4705b\0.3.3\Save-GitRepository.ps1
2018-10-23T04:00:42.2150146Z 
2018-10-23T04:00:42.2150146Z 
2018-10-23T04:00:42.2270158Z 
2018-10-23T04:00:42.2270158Z 
2018-10-23T04:00:42.2690200Z Updating repository inside D:\Temp\vsts\ado\1\git\ResharperMacro.git
2018-10-23T04:00:42.2690200Z 
2018-10-23T04:00:42.2690200Z 
2018-10-23T04:00:42.3520283Z git add .
2018-10-23T04:00:42.3520283Z         git stash
2018-10-23T04:00:42.3520283Z 
2018-10-23T04:00:42.3520283Z 
2018-10-23T04:00:43.2511182Z No local changes to save
2018-10-23T04:00:43.3131244Z Pulling update from branch/tag v2018.2.3
2018-10-23T04:00:43.3131244Z 
2018-10-23T04:00:43.3131244Z 
2018-10-23T04:00:43.3131244Z git config credential.interactive never
2018-10-23T04:00:43.3131244Z 
2018-10-23T04:00:43.3131244Z 
2018-10-23T04:00:43.3591290Z git pull origin v2018.2.3
2018-10-23T04:00:43.3591290Z 
2018-10-23T04:00:43.3591290Z 
2018-10-23T04:00:44.7552686Z From https://github.com/fakhrulhilal/ResharperMacro
2018-10-23T04:00:44.7552686Z  * tag               v2018.2.3  -> FETCH_HEAD
2018-10-23T04:00:44.7552686Z 
2018-10-23T04:00:44.9262857Z Already up to date.
2018-10-23T04:00:44.9522883Z ##[section]Finishing: Fetch git: https://github.com/fakhrulhilal/ResharperMacro.git

I update your commend for more readability.

@fakhrulhilal
Copy link
Owner

I think I know your problem now. I will fix the bug and let you know once finished.

Main issue:
The task is designed to download only one specific branch/tag. Whenever the branch/tag is changed, it tries to checking out to new branch/tag which's not downloaded yet in local repo. Thus error occurs.

Precondition:

  • Get sources of main build: clean = false
  • The git repository downloader options:
    • clean = false
    • Branch/tag = let's say branch A

Reproduce step:

  1. Queue the build
  2. Queue the build again but change the branch/tag to other

@fakhrulhilal fakhrulhilal self-assigned this Oct 23, 2018
@fakhrulhilal fakhrulhilal added the bug Something isn't working label Oct 23, 2018
@fakhrulhilal
Copy link
Owner

fakhrulhilal commented Sep 25, 2019

AB#23

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants