R
R
romaro2021-12-26 00:29:36
git
romaro, 2021-12-26 00:29:36

Why can't push to Bitbucket?

I know this is a common problem, but none of the solutions worked for me. Including what is described on their website .

Given: Oracle Linux server, 1 user, 2 directories. In each project.

What I did:
1) created a key, it is available via cat ~/.ssh/id_rsa.pub
2) added this key to my personal settings https://bitbucket.org/account/settings/ssh-keys/

I try ssh -T bitbucket. org, I get:

[email protected]: Permission denied (publickey).


But what is most interesting, I can push from one folder, i.e. the remote repo connected somehow. And from the second to none.

Although I tried to connect the second folder in the same way:
git remote add origin [email protected]/myacc/myproj.git


Output of git remote -v
origin  [email protected]/myacc/myproj.git (fetch)
origin  [email protected]/myacc/myproj.git (push)


Log:
> git symbolic-ref --short HEAD
> git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/master refs/remotes/master
> git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname)
> git remote --verbose
> git config --get commit.template
> git push -u origin master
fatal: '[email protected]/.../....git' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Kuznetsov, 2021-12-26
@romaro

Fix url error

git remote set-url origin [email protected]:myacc/myproj.git

The Permission denied message is confusing. Git writes Permission denied for any problem with data transfer, although the error is not in access rights, but in the fact that Git simply did not find the repository at the specified address. ...does not appear to be a git repository

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question