I changed my password (per Atlassian email) for Bitbucket, and now my source tree cannot push code to repo. I create a SSH key, but it is for read-only and I cannot push my commits. Anyone else run into this? Any suggestions?
Hello Travis,
Changing your password within Bitbucket can cause this issue within Sourcetree due to cached credentials. There are a few options to resolve this issue (depending on the OS you’re using)
Ensure Sourcetree is closed prior to completing these steps.
Windows:
Mac OS:
Additionally, if this does not work you may need to clear out your Sourcetree preferences to resolve the issue. You may find further information about this at How to Wipe SourceTree Preferences.
I hope this helps to give guidance on how to resolve your credential issue. If you’re still having an issue after these steps, please let us know.
Regards,Stephen Sifers
Hey Stephen, thank you for the reply.
I have deleted the password file from Windows, and working on cleaning out the preferences for Source Tree. I was trying to work on SSH only authentication, per Atlassian recommendation, but the only thing I could setup was a read-only key. Not sure, what the issue was on my end, but I am still getting an error when trying to push, that states this: repository access denied. access via a deployment key is read-only.
Which, make sense as I loaded the SSH key as read-only on BitBucket(as there was no where else I knew to load, per Atlassian documentation). I hope that clearing out the preferences removes the SSH route, but I am not sure and wanted to post this in the interim while I work on it.
Also, I update the URL from HTTPS to SSH, per this walk through, so that might be an issue on my side as well: https://confluence.atlassian.com/bitbucket/change-the-remote-url-to-your-repository-794212774.html
Thanks again for all the info, and let me know if there are any additional steps I need to look out on the config side for removing the SSH read-only key, piece.
thanks
Travis
Hello again Travis,
The SSH key which you added to Bitbucket, was it within your profile settings or within a specific repository?
The error you’re getting may also be related to Bitbucket no having your public key or your SSH agent does not have your SSH key. You can see additional troubleshooting steps for this at Troubleshoot SSH issues
Additionally, there is a stackoverflow thread similar to the new error you are having, you may find that thread at https://stackoverflow.com/questions/13306435/repository-access-denied-access-via-a-deployment-key-is-read-only
Please do let us know the outcome of the preference clean-out along with any SSH rekeying you end up doing.
EDIT: I just saw your reply, so mine is a little out of whack with yours. I did try the clean and it did not help with the error, so see below on what I did.
Hey Stephen
I apologize, as I wrote my reply within the suggested answer area.
So, I tried everything you had written down, but my SourceTree was still routing through the SSH read only keys, so I reversed what I had on my URL, from SSH to HTTPS, but I still am getting errors.
The error I am getting is that either, the URL is incorrect, or if I put in a certain URL, the push acts like it goes through, but all my commits are still within Source Tree. Here is the error I am getting:
fatal: HttpRequestException encountered. An error occurred while sending the request.fatal: HttpRequestException encountered. An error occurred while sending the request.Pushing to https://<username>@bitbucket.org/<userName>/<repo name>.gitTo https://bitbucket.org/<UserName>/<Repo Name>.git = [up to date] masterlaptop -> masterupdating local tracking ref 'refs/remotes/origin/master'Everything up-to-date
So, I might have the URL for the Repo, incorrect, but I am not sure. Again, any suggestion or help is greatly appreciated.
Thanks
No worries on the replies or edits.
Lets start with removing and re-creating your SSH key (On both ends, Bitbucket and Sourcetree/SSH agent).
From there, lets run back through the SSH setup for Sourcetree on Windows: Set up SSH with Sourcetree on Windows. Ensure your SSH key is added to your Bitbucket settings and not a repository.
Something along the way is getting cached or has not been cleared out. Once you run back through the SSH setup, please let us know if the same error is still present.
OK, so this is not really an answer, as I was never able to get this to work. I just copied my code into a new folder location and created a new repo and was able to push to that to BitBucket. I still have no idea why my original repo won't push.
It looks like you're new here. Sign in or register to get started.