A
A
Alexander2021-08-02 20:17:36
linux
Alexander, 2021-08-02 20:17:36

Why can't I switch from authorization by password to authorization by key?

I set up authorization by key in bitbucket, everything seems to be correct
if I clone the repository, then the key is picked up and everything works fine.

But when I try to perform operations in an existing project, in which I previously authorized by password , it still asks for a password, even if you crack. And does not use the key

cat ./git/config - git config in the project

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "origin"]
        url = [email protected]:myteam/repository.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri, 2021-08-02
@alexmixaylov

Change the remote url for your project:
git remote set-url <remote_name> <remote_url>
Where remote_name is most likely origin.
See the new remote_url on the bitbucket: click clone in your project, select SSH in the modal header and copy the resulting link.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question