Why I cannot push my code from SourceTree to Remote Repo BitBucket Server?
Asked by Wang_ Qiang:

Hi,   

I try to push my code in my local repo from SourceTree to Remote Repo BitBucket Server,

I tried many times, all failed.

I got a message like following:  

<br />

remote: Push rejected.  
remote:  
remote: refs/heads/feature/xxxxxxxx/Issues: Could not authenticate. Visit <https://XXXXXX/applinks/oauth/login-dance/authorize?applicationLinkID=abbbbbbbbbb> to link your Stash account to your JIRA account.

Can some experts here throw some lights to guide how to fix it,

I use SourceTree version is latest, Version 3.4.3

Thanks

Charlie


Answers:
author: Mikael Sandberg
body: Hi [@Wang_ Qiang](/t5/user/viewprofilepage/user-id/4669159),

Welcome to Atlassian Community!

The error message indicate that your account on the remote Bitbucket server has been locked due to to many failed attempts, so you have to go to the server and login in order to clear that flag. Once you have done that you should be able to push again.

comments: author: Wang_ Qiang
body: Mikael:  
Thanks so much,   
Yes I did login to remote Bitbucket server, but where Can I find the flags to clear them?  
Any link or page or item to indicate flag?  

Thanks again  

Charlie  


author: Wang_ Qiang
body: Actually, I clear all cache data in chrome browser, tried again, still get same error:  

remote: Push rejected by YACC  
remote: Push rejected.  
remote:  
remote: refs/heads/feature/xxxxxxxx/Issues: Could not authenticate. Visit [https://XXXXXX/applinks/oauth/login-dance/authorize?applicationLinkID=abbbbbbbbbb](https://xxxxxx/applinks/oauth/login-dance/authorize?applicationLinkID=abbbbbbbbbb) to link your Stash account to your JIRA account.  

Thanks

Charlie


author: Mikael Sandberg
body: Did you click on that link in the error message? It looks like you have a hook that checks something in Jira, and your Bitbucket account is not linked to your Jira account.


author: Wang_ Qiang
body: Thanks a lot!  

Yes, I click the link, follow the instruction, looks access permitted, it makes progress,

Then push again, I got reject and a little bit diff error:  

remote: xxxxxx: 10c52da87a622f272a014774b5fad5654ef76b7d: abbbbb/Issues: Could not authenticate. Visit <https://abbbb.ccc.com/scm/plugins/servlet/applinks/oauth/login-dance/authorize?applicationLinkID=22222222222222> to link your Stash account to your JIRA account  
remote: xxxxxx: abbbbb/JIRA3: abcdf-536: JIRA Issue does not match JQL Query: status="In Development"  
remote:  
remote: xxxxxx: a687caed5990b37e3c442c345b563a2d64f37aad: abbbbb/Issues: Could not authenticate. Visit <https://abbbbb.cccc.com/scm/plugins/servlet/applinks/oauth/login-dance/authorize?applicationLinkID=12345555> to link your Stash account to your JIRA account  

<br />

Thanks

Charlie


author: Mikael Sandberg
body: Okay, so it looks like the hook/app that you are using is expecting the issue that you mentioned in your commit comment should be in status "In Development" and it is not. So go and check that your Jira issue is in the correct status and then try again.


author: Wang_ Qiang
body: Mikael:

Thanks a lot!  
I will check soon.

Good weekends

Charlie


author: Wang_ Qiang
body: one more error message:

remote: Push rejected by YACC