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

ssh-key passphrase permission denied (using ansible)

James
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 14, 2023

Hello.

I have problem. ssh-key passphrase permission denied (using ansible)

ansible playbook : 

- hosts: testnew

  gather_facts: no

  become: yes

  tasks:

  - name: Git update

    git:

      key_file: /root/.ssh/new_rsa

      repo: git@bitbucket.org:Ads/ads.git

      dest: /path/

      accept_hostkey: yes

      remote: origin

      update: yes

      version: feature/out

    ignore_errors: yes

 "msg": "Failed to download remote objects and refs:  git@bitbucket.org: Permission denied (publickey).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n"

I use ssh-agent 
ssh-add asa_key
enter passphrase 

 

2 answers

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 17, 2023

Hi James,

I'm not really familiar with ansible, but I would need some additional info to better help you.

  • What operation is showing this error? Is it a git clone/pull or a git push?

  • Where have you added the public SSH key? To a Bitbucket account, to a Bitbucket workspace, or to the Access keys of a repo or project?

  • What are the private key file permissions?

  • Do you have the option to add verbose mode to SSH when this operation is performed? E.g. when cloning from a terminal, the following command can be used for printing verbose output:
    GIT_SSH_COMMAND="ssh -vvv" git clone <repo_url>

    Do you have the option to configure something similar and then post the output here? The verbose output will show which SSH key is offered during the operation, so we can double-check if the correct one is offered and if there are any other additional errors printed.

Kind regards,
Theodora

0 votes
Sanjen Bariki
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 14, 2023

Hi @James ,

 

Welcome to Atlassian community!

Please find the below document for the Permission denied issue in Bitbucket.

 

Regards,

Sanjen

James
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 14, 2023

and? Ansible don't checkout and pull. I read all documents 

Sanjen Bariki
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 14, 2023

Hi @James 

 

As per the permission denied issue related to that document.

Could your please explain more about it what you are looking now..?

 

Regards,

Sanjen

Suggest an answer

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

Atlassian Community Events