Jenkins could NOT discover Repositories
Asked by Johnson Shao:

My company recently moved the source control into Bitbucket.rog. The commercial plan.

How we use:

* Our developer team still using the **company email id** (like name1@myCompany.com) to login to <https://bitbucket.org> for operating, but a redirect to a company grant privilege's page is always needed.
* all repos are grouped under a logical group(say **myCompany** ), I don't how to say it, the \`*workspace* \`?? anyway, the summary page for list all available repos are: <https://bitbucket.org/>**myCompany**/
* All repos are private and contained the file: **Jenkinsfile**

We have setup a standard Jenkins server(version 2.249.3) in a cloud, with plugIn: bitbucket 1.1.27, I created a build job item: **Bitbucket Team/Project** , input the credential with type Username and password, of course the username is: name1@myCompany.com, and this user **has been granted 'admin'** , the Owner I input the **myCompany**.

![WeChat Image_20201123125830.png](https://community.atlassian.com/t5/image/serverpage/image-id/119261i894B1624BF2EFDF1/image-dimensions/489x192?v=v2 "WeChat Image_20201123125830.png") {#toc-hId--1298255627}
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

after ran this job, the overall connection seems fine, but never scanned any repos, the jenkins job logs:

Started  
\[Mon Nov 23 13:05:31 CST 2020\] Starting organization scan...  
\[Mon Nov 23 13:05:31 CST 2020\] Updating actions...  
Looking up team details of myCompany...  
Connecting to <https://bitbucket.org> using name1@myCompany.com/\*\*\*\*\*\* (fffff)  
Could not resolve team details  
\[Mon Nov 23 13:05:33 CST 2020\] Consulting Bitbucket Team/Project  
Connecting to <https://bitbucket.org> using name1@myCompany.com/\*\*\*\*\*\* (fffff)  
Looking up repositories of user myCompany  
0 repositories were processed  
\[Mon Nov 23 13:05:33 CST 2020\] Finished organization scan. Scan took 2.1 sec  
Finished: SUCCESS

any idea???


Answers:
author: Theodora Boudale
body: Hi [@Johnson Shao](/t5/user/viewprofilepage/user-id/4170167) and welcome to the community!

Based on the info you gave us here, I believe you'll need to look into the following 3 things:

**1.** For HTTPS authentication, you will need to use the Bitbucket username of the account you are authenticating with, instead of the email. The email is needed for logging in to the website (<https://bitbucket.org/>) only.

If this is your Bitbucket Cloud account, you can find the username in the following page after you log in:

* <https://bitbucket.org/account/settings/>

**2.** Since your company has managed accounts (the company domain has been verified), you will also need to use an app-password for authentication instead of a password.

You can find instructions on how to generate an app-password for the Bitbucket Cloud account you use for authentication here:

* <https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/>

**3.** I see in your screenshot a field **Owner**, below the credentials. What is the description of this field? What are the instructions on what to fill in there?

I suggest double checking what is expected in this field, but I believe that you may need to fill in the workspace ID of the workspace that owns the repos your team is working on.

Have you replaced 'myCompany' with the actual workspace ID? Because the log you gave us here mentions 'myCompany'. The workspace ID should indeed be the part of the URL after <https://bitbucket.org/> , in the URL where the repos can be found <https://bitbucket.org/myCompany>

Kind regards,  
Theodora


Tags: continuous-delivery

jenkins