I am having some issues with fastlane and cloning a git repo from BitBucket. I am getting following error:
fatal: could not read Username for 'https://bitbucket.org': terminal prompts disabled
[17:21:34]: Exit status: 128
[17:21:34]: Error cloning certificates repo, please make sure you have read access to the repository you want to use
[17:21:34]: Run the following command manually to make sure you're properly authenticated:
I can manually git clone
the repo without issue but when I am running it with fastlane, I am facing issues.
This error means git can't find the username for the repo when run with terminal prompts disabled. You should be able to reproduce this by trying to clone the repo yourself like so:
$ GIT_TERMINAL_PROMPT=0 git clone https://bitbucket.org/org_name/repo_name
git is requiring you to enter the username manually because it does not have a credential stored.
Since you're using fastlane, I'm going to assume the most likely cause: you're on macOS but you haven't configured the git-credential-osxkeychain
tool which provides credentials from the keychain to the git
command line tool.
Run
$ git credential-osxkeychain
to verify the tool is installed.
If this fails, either install Xcode command line tools, or run
brew install git
to install it.
Run
$ git config --global credential.helper osxkeychain
to configure the tool.
git clone …
) as normal and loginNow your BitBucket credentials should be stored in your keychain and both GIT_TERMINAL_PROMPT=0 git clone
and fastlane match should succeed.
If you're not on macOS, you'll need to install and configure a similar credential.helper
for your operating system.
I had the same issue and I have added githubkey path
match(git_private_key:"/Users/ajeetsharma/Desktop/Study/Fastlane/FastLaneDemo2/fastlane/gitHubKey")
And It has resolved
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With