Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,368,217
Community Members
 
Community Events
168
Community Groups

git clone without password prompt

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

4 votes

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.

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

@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 Jun 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

Atlassian Community Events