Git Clone step fails: ERROR: manual PR merge chekout strategy can not be used

#1

Hi,
without any changes to my config, I started getting the error on the git clone step:

$ git "init"
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint: 	git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint: 	git branch -m <name>
Initialized empty Git repository in /Users/vagrant/git/.git/
$ git "remote" "add" "origin" "git@github.com:foo/bar.git"
ERROR: manual PR merge chekout strategy can not be used: no source repository URL or source branch commit hash specified

Git Clone v5.x

Did I miss something? It all used to work fine.

cheers

Build log

https://app.bitrise.io/build/4dd5ce5d9313dd81#?tab=log

0 Likes

#2

The error message is coming from this file in the Git Clone plugin

	if strings.TrimSpace(sourceRepoURL) == "" && strings.TrimSpace(commit) == "" {
		return NewParameterValidationError("manual PR merge chekout strategy can not be used: no source repository URL or source branch commit hash specified")
	}

and it looks like my commit hash is indeed empty

+------------------------------------------------------------------------------+

| (1) git-clone@5.0                                                            |
+------------------------------------------------------------------------------+
| id: git-clone                                                                |
| version: 5.0.0                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2021-03-28T17:48:24Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
Config:
- RepositoryURL: git@github.com:foo/bar.git
- CloneIntoDir: /Users/vagrant/git
- Commit: 
- Tag: 
- Branch: master
- PRDestBranch: master
- PRID: 0
- PRSourceRepositoryURL: 
- PRMergeBranch: 
- PRHeadBranch: 
- ResetRepository: false
- CloneDepth: 0
- FetchTags: false
- LimitSubmoduleUpdateDepth: true
- ShouldMergePR: true
- BuildURL: https://app.bitrise.io/build/e332bd5485997ae1
- BuildAPIToken: [REDACTED]
- UpdateSubmodules: true
- ManualMerge: true

but why?

0 Likes