A previously-working jenkins bitbucket user credential has been broken by Atlassian Bitbucket's new enforcement of using app passwords only, even when the new app password is updated in the credential for the same user/credential. This error is displayed in jenkins:
> Failed to connect to repository : Command "git ls-remote -h --
> https://bitbucket.org/<project>/<repo>.git HEAD" returned status code
> 128: stdout: stderr: remote: Bitbucket Cloud recently stopped
> supporting account passwords for Git authentication. remote: See our
> community post for more details:
> https://atlassian.community/t5/x/x/ba-p/1948231 remote: App passwords
> are recommended for most use cases and can be created in your Personal
> settings: remote:
> https://bitbucket.org/account/settings/app-passwords/ fatal:
> Authentication failed for
> 'https://bitbucket.org/<project>/<repo>.git/'
I also tried deleting and recreating the credential with the new app password and this error still happens. How to get the credential working again?
The user in the credential previously was the email address for the Bitbucket account. The user needed to be changed to the actual username for the account as found in BitBucket web interface > User Avatar > Personal Settings > Account Settings > Bitbucket profile settings section > Username.
Related
I'm trying to configure flow which include git repository
things to note:
i have a git server running in internal network
my jenkin running on one of the machine in the network so it can access git server through local ip
normally i would go like this with my git command
git remote add origin ssh://username#git-server-ip/path-to-folder
after that it prompt me to type in the password for the above username
and i can work on the git repo like normal
The problems:
in Jenkin i already set up credential with "username and password" type
When i paste in the ssh url into the Repository URL, it take a while and return error:
Failed to connect to repository ...
stdout: stderr: Permission denied, please try again. Permission
denied, please try again. username#git-server-ip: Permission denied
(publickey, password). fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository
exists.
i had selected credentials and double check username and password it's correct. i tried running the ls-remote command manually in the terminal
git ls-remote -h -- ssh://username#git-server-ip/path-to-folder HEAD
it prompts to input the password, i typed it in and it run normal without error
Why is the error only happens on Jenkins when i input the repo ssh url? is username and password credential the wrong approach for credential? what else should i use?
there no guide online for Jenkin with internal git ssh url as i known of
the closest i can see my problem related to is this question Jenkins Git ssh setup does not let me use username/password , but it doesn't have an accepted answer yet, and the answer suggest going with "ssh username and private key"
I am trying to setup Fastlane for iOS certificates and profile syncing in my MacBook. When I execute the command sudo fastlane match development --readonly, I get below error.
What is it actually? I guess that the terminal is blocking the prompt where I could enter the match password. I do not understand why I face this issue, also I have access to the repository.
Normally, the password would be cached in your Credential Storage (osxkeychain on Mac), but for your current user.
And you are executing that command as root.
Check:
if you have a credential helper set (with your account)
git config credential.helper
if your credentials are stored
git ls-remote https://...
# if a popup is displayed, enter your credentials there
if the same command would work if executed as you (instead of root)
I assume you have used ssh with the old macbook, are you trying now with https ?
Btw, it is not recommended to use the local fastlane, see Bundler.
I am trying to push my patches to a Gerrit server, I've generated a SSH key and added to the Settings. However, when I'm trying to push(repo upload), it shows another username so I don't have permission to push.
I've tried using git config to set my username but not working at all.
Performed ssh -vv -p 29418 genesis331#gerrit.aospa.co it works but not ssh -vv -p 29418 cheah3838#gerrit.aospa.co.
Btw my email is cheah3838#gmail.com maybe it is an important information?
In the console,
cheah3838#gerrit.aospa.co: Permission denied (publickey).
fatal: Could not read from remote repository.
But actually should be genesis331#gerrit.aospa.co.
You need to configure your Git config for repo upload
$ git config --global review.gerrit.aospa.co.username genesis331
The repo documentation may help you if you need more information:
$ repo help upload
[...]
review.URL.username:
Override the username used to connect to Gerrit Code Review. By default
the local part of the email address is used.
The URL must match the review URL listed in the manifest XML file, or in
the .git/config within the project. For example:
[remote "origin"]
url = git://git.example.com/project.git
review = http://review.example.com/
[review "http://review.example.com/"]
autoupload = true
autocopy = johndoe#company.com,my-team-alias#company.com
[...]
This may seem like a bit of a rudimentary issue, but I cannot seem to push from Sourcetree (windows) to a bitbucket repo for which my user is the owner.
To clarify I can log in to the repo using my browser just fine but when I push to it from Sourcetree and I enter the same details into the prompt box it fails to authenticate. I have tried using the username and email, I've even changed the password of the account but still no joy.
I also created an app password and tried using that as the password with combinations of the username and email, but no joy.
the error I am getting is:
git -c diff.mnemonicprefix=false -c core.quotepath=false
--no-optional-locks -c credential.helper= -c credential.helper="C:/Users//AppData/Local/ATLASS~1/SOURCE~1/GIT_EX~1/GIT-CR~1.EXE"
push -v --tags origin master:master fatal: HttpRequestException
encountered. An error occurred while sending the request.
remote: Invalid username or password. If your organization manages
your account or you've enabled two-step verification, create an app
password to log in: https://confluence.atlassian.com/x/9DJmMQ fatal:
Authentication failed for
'https://#bitbucket.org//.git/'
Pushing to https://#bitbucket.org//.git Completed
with errors, see above.
Any advice would be greatly appreciated
Try to add a new SSH key via Sourcetree, seems like Sourcetree is not picking up your username and password when you are using HTTP/S authentication, it can be because:
You have not added your account info in git global
You have not properly assigned credentials
Using SSH is a far preferred way:
https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html#SetupanSSHkey-ssh3
I deleted:
C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree\passwd
C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree\accounts.json
Inspired by this article: https://community.atlassian.com/t5/Sourcetree-questions/Getting-quot-fatal-Authentication-failed-for-quot-error/qaq-p/624663
It worked. When I restarted SourceTree it acted like it was the first time it was opened (downloaded some tools, asked me for my credentials). Once it finished, my project tabs were there, and I was able to pull/push.
Perform below steps:
Reset your password : https://id.atlassian.com/manage/change-password
Run below command from working copy
git remote set-url origin Your-repository-url-here
In order to get it worked I ended up going to Tools -> Options -> SSH Client configuration and changing it to OpenSSH. and set the path to the already generated ssh key file like C:\Users<user>.ssh\id_rsa.
This is the error on my terminal:
Authentication failed for 'https://bitbucket.org/railstutorial/sample_app_4th_ed.git/'
This is what I did:
git remote add origin ssh://git#bitbucket.org/kboygitgit/sample_app.git
git push -u origin master
then it asked for my username and password
then the error showed up
remote: Unauthorized
fatal: Authentication failed for 'https://bitbucket.org/railstutorial/sample_app_4th_ed.git/'