Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

bitbucket ssh allows me pulls, but not push on vscode

gibarra-ia
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!
May 9, 2025

bitbucket ssh allows me pulls, but not push on vscode

 

-- stack -->

025-05-09 21:59:06.164 [info] > git push origin feature/create-app:feature/create-app [8162ms]
2025-05-09 21:59:06.165 [info] Unauthorized
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
2025-05-09 21:59:06.264 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/feature/create-app refs/remotes/feature/create-app [88ms]
2025-05-09 21:59:06.268 [warning] [Git][revParse] Unable to read file: ENOENT: no such file or directory, open 'c:\Users\{path}\.git\refs\remotes\origin\feature\{branch}'
2025-05-09 21:59:06.269 [info] > git config --get commit.template [100ms]
2025-05-09 21:59:06.321 [info] > git rev-parse refs/remotes/origin/feature/create-app [53ms]
2025-05-09 21:59:06.431 [info] > git for-each-ref --sort -committerdate --format %(refname)%00%(objectname)%00%(*objectname) [86ms]
2025-05-09 21:59:06.432 [info] > git status -z -uall [106ms]

2 answers

1 vote
Aron Gombas _Midori_
Community Champion
May 13, 2025

My colleague faced the same problem last week.

In his case, the problem was that he entered the SSH key to the form which manages the keys for read-only access (like an external CI/CD system), not to the form which belong to his user account. I think the wrong form was called "Repository keys" or something like that.

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 13, 2025

Hey @gibarra-ia ,

and welcome to the Community!

There could be several reasons for this issue when pushing a new commit, so I'd suggest starting by ruling out any VSCode-specific settings.

In this case, could you try to replicate the issue by pushing directly from your terminal instead of from VSCode, and adding the verbose flags to confirm which key is being used?

GIT_TRACE_PACKET=1 GIT_TRACE=1 GIT_SSH_COMMAND="ssh -vvv" git push

If you are using Windows, you can use Git Bash (which mimics a Unix terminal) to do the push, and then share the logs with us here.

Thank you, @gibarra-ia !

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events