401 when triggering jenkins build from branch list in Stash

I have PBfJ installed on my Stash server, but when I try to trigger a build from the branch list i get a 401 error: "invalid password/token for user: jbuilder" and no build is triggered.

I've tried using no token, and using the jenkins api token for user 'jbuilder'. Same error in both cases.

 

What am I doing wrong?

 

2 answers

0 vote

Hello, 

It's similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the requested resource. 

Something is wrong or with your user/password/token or some permission might missing in some place. Also, can you confirm if there's some proxy between those applications? This might causing this behaviour.

As a quick test, are you able to authenticate using that user and password directly on the application? 

One last thing, are you using SSH for this communication? If so, can you confirm that the ssh-agent and the key is loaded?

ssh-agent -l #this command list your ssh key (if that is loaded).

ssh-agent #this command start the agent

 

Cheers, 
Renato Rudnicki 

You ask "are you able to authenticate using that user and password directly on the application?" But there is no place in the configuration to specify a password. Only an API token. You ask "are you using SSH for this communication?" But there is no way to specify which protocol to use. See next comment for a screenshot of the options.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

22,215 views 26 11
Join discussion

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