Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

cant push to new! created repository

keulemaster November 25, 2022

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?

3 answers

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 29, 2022

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

keulemaster November 30, 2022

@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

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 1, 2022

Hello @keulemaster ,

In order to further investigate this case, I have created an internal ticket for you using the email of your community account, so you don't have to share this information here.
You should have received an email with a link to the support ticket. Just in case you haven't received it, please feel free to let me know and I can post the ticket URL here. The ticket will be visible only to you and Atlassian staff, no one else can view its contents even if they have the URL.
Thank you, @keulemaster .
Patrik 
0 votes
AKC Canine Health
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 25, 2022
  1. Run git init in the terminal. This will initialize the folder/repository that you have on your local computer system.
  2. Run git add . in the terminal. 
  3. Run git commit -m"insert Message here" 
  4. Run git push origin master .
keulemaster November 25, 2022

of course, i have allready done this many times, in this project and in all of ma other projects. why should this help?

0 votes
Instagram Followers November 25, 2022

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events