i am using ssh keys for authentification. on my old repos i can pull, push, everything works. that should also means, that my ssh-key which i added to my personal settings is working.
but on the same ubuntu machine, i cant push anything to a new created repository.
it fails with:
The requested repository either does not exist or you do not have access. If you believe this repository exists and you have access, make sure you're authenticated.
when i try:
ssh -i -T git@bitbucket.org
Warning: Identity file -T not accessible: No such file or directory.
PTY allocation request failed on channel 0
authenticated via ssh key.
You can use git to connect to Bitbucket. Shell access is disabled
Connection to bitbucket.org closed.
it shows that authentification works.
any ideas?
Hello @keulemaster ,
Thank you for reaching out to Atlassian Community!
The error you are receiving is most likely because the ssh key being used does not have the required permissions in the repository you are trying to push to.
The test with the ssh command you have used confirms the SSH key used is recognized by bitbucket for authentication, but when pushing to a repository, bitbucket also checks for authorization to confirm if that key has access to the content you are trying to read/write.
When you add an ssh key to your personal settings, this key will have the same access as your account, so your account needs to have write permissions to the repository you are pushing to.
Another thing that might be happening if you have multiple SSH keys in your local machine, is that the wrong key is being presented to git. In order to check what the key ssh is trying to use you can run the following command to include verbose logs :
GIT_TRACE_PACKET=1 GIT_TRACE=1 GIT_SSH_COMMAND="ssh -vvv" git push
That will include ssh logs of the keys that were found and the order of precedence that ssh will attempt to use them.
By default in SSH, the first key that passes authentication will be used, but that does not necessarily mean that key has access to the repository in question. So make sure to identify if the key being used is the one you have added to the bitbucket account that has access to the repository.
Hope that helps! Let me know in case you have any questions.
Thank you, @keulemaster .
Patrik S
@Patrik SHello Patrik, thanks for the informativ answer!
The repository into i cant push, was made by me, with the user that i used also for the authentification test with SSH. I also tried two different PCs, from both i cant push anything to my new project. I also cant add my user for authorization to the new project, because as the owner of the workspace, i am implicitly added. Maybe i miss some configuration stuff? i allready mad more then 10 repos at bitbucket, all of them worked for me. but the last one didnt...
i double checked..i have only on ssh key in my ubuntu account...on both of my PCs.
Thanks for your help
keulemaster
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @keulemaster ,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
of course, i have allready done this many times, in this project and in all of ma other projects. why should this help?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
On GitHub.com, navigate to the main page of the repository. Above the list of files, using the Add file drop-down, click Upload files. Drag and drop the file or folder you'd like to upload to your repository onto the file tree.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.