Can I remove the user name from the stash clone repository path?

Hi!

When I clone a stash repository, the clone path from stash gives me

'http://niharika@localhost:7990/scm/cct/icec.git'

Is there a way I can remove 'niharika@' from this clone path and the git bash prompts me for user name when I try to clone it.

I should get the clone path as 'http://localhost:7990/scm/cct/icec.git'

Username :

Password :

Thanks!

2 answers

0 vote
Jeff Thomas Atlassian Team Jun 29, 2014

Hi Niharika,

I just tried this locally with Stash 3.0.4 and I was prompted for my username and password. Is it possible that you're on an older version of Stash if the below is not the behavior you're seeing?

git clone http://localhost:7990/scm/test/changes.git
Cloning into 'changes'...
Username for 'http://localhost:7990': my_user
Password for 'http://my_user@localhost:7990': 
remote: Counting objects: 68, done.
remote: Compressing objects: 100% (45/45), done.
remote: Total 68 (delta 20), reused 0 (delta 0)
Unpacking objects: 100% (68/68), done.
Checking connectivity... done.

I have this same question: I think what Niharika was asking is there a way to remove the username from the clone pop-up in the stash UI. When I am browsing the stash repository and I click on the clone link under http it shows username@repo.url/path/repo.git. I use the "clone" link for more than just actually cloning -- sometimes I am pinging a reference to a repository in an email or adding a submodule in a different repo. In both these cases it would be nice to NOT have my username in the URL. I think what he was asking is there a way to change the behavior in the UI. (This would also be consistent with the SSH link which does not include the user.

There are two ways to bypass the password prompt, that I know of.

  1. Use ssh.
  2. Enable anonymous readers for the repository or at the project level.

SSH has a different URL path and you have to setup the ssh key in each user's profile.

We use the ssh route for those repositories and projects with read restrictions, in our other tools, like Crucible and Jenkins.

HTH,

John

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

710 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot