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

git clone without password prompt

Sagar Veerla June 24, 2020

I want to git clone a repo without being prompted by a password, a method other than SSH.

I would like to clone a repo in a single line.

2 answers

5 votes
ktomk
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.
June 24, 2020

Hi @Sagar Veerla,

welcome to the Atlassian Community.

One way to clone a repository without having to enter your password would be to create an app-password and use it while cloning.

 

git clone https://<user>:<app-password>@bitbucket.org/workspace/repository.git

That done, git won't prompt for user name and password.

Mind that this is a URL and needs to be encoded as an URL then.

This will leave the password in the git configuration. Alternative options are git credentials helper and SSH.

Viduranga October 14, 2021

thank you very much. can this assigned to specific repository ? .

ktomk
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.
December 13, 2021

@Viduranga  Yes, but no idea what you're asking for specifically: As this is within the git clone <repo>, you can make it specific at least per any of such URI - which could be per repository.

For a specific repository in and on itself, consider to configure it (e.g. git-config(1)).

0 votes
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 24, 2020

Hi @Sagar Veerla,

Welcome to Atlassian Community.

The only way you can clone a repository without having to enter your password would be to make the repository public, then a password is not required. But note that you would not be able to push anything back to Bitbucket without entering a password/using SSH. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events