The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

User lockout while doing parallel cloning or repositories

arpit doshi
February 24, 2015

We are running multiple scripts from one user account to clone multiple repositories in parallel.

When we cloning 10 repos together, it's working fine. When we try cloning 15 repos together, it lock out stash user and gives below error.

Cloning 'xyz' mirror

Fetching 'xyz'

Cloning into bare repository '/lhome/abcd/tmp/xyz1'...

Cloning into bare repository '/lhome/abcd/tmp/xyz2'...

Cloning into bare repository '/lhome/abcd/tmp/xyz3'...

Cloning into bare repository '/lhome/abcd/tmp/xyz4'...

fatal: Authentication failed

We have integration with crowd for user authentication.

Thanks !!

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 27, 2015

This is caused by the way git authenticates over HTTP. For any request, git will do the following:

  • send a HTTP request (typically /scm/project-key/repo-slug/info/refs) without username/password. Stash will send back a 401 Unauthorized
  • send another HTTP request, this time with the username, but without a password. Stash will try to authenticate but will fail and increase the failed authentication count. Stash sends back another 401.
  • send another HTTP request, this time with username and password. Authentication will succeed and the failed authentication count will be set to 0.

In your case, I think the same user is trying clone multiple repositories in parallel and the 'failed authentication count' exceeds your configured CAPTCHA limit. 

There are a couple of ways to get around the problem:

  • switch to SSH. Authentication with an SSH key will never trigger CAPTCHA
  • increase the CAPTCHA limit
  • serialize the clone operations (don't start them in parallel)

 

 

TAGS
AUG Leaders

Atlassian Community Events