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 votes
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 Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

408 views 5 9
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