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

Niharika Shri June 29, 2014

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
jcurleyWR
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 30, 2014

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

0 votes
Jeff Thomas
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 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.

angelosarto March 9, 2015

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events