Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How should we install internal python packages while running bitbucket pipeline?

We have packages from our internal pip server that are used in the repository. How to install these packages while running the bitbucket pipeline.

Please find the attached screenshot of the error shown. Screen Shot 2017-08-17 at 7.57.44 PM.png

1 answer

0 votes

Hello,

 

Is your internal pip server somehow accessible via the public internet?

Here's how you can add a private git repository as a dependency. Maybe this can get your started on the right track? https://stackoverflow.com/questions/4830856/is-it-possible-to-use-pip-to-install-a-package-from-a-private-github-repository

Thanks,

Phil

@Philip Hodder  - I know this is an old question but I've just hit this issue myself where I have a private pypi server with built packages from a git repo stored in Bitbucket that I need to use in the pipelines of another repository. The Pypi server is IP and username restricted and I don't want to make it public so I was wondering if there is another way to load private packages in directly into the caches or even by using the git+ version though since it's a private bit bucket repo as well will that even work or does pipeline run as the user making the commit?

Like Diego Fioravanti likes this

So the answer was

  1. In the project you are working on go to Settings -> Pipelines -> SSH Keys and generate a new key
  2. Go to the repository of the package you wish to install and under the main Access Keys paste the key that you just created.
  3. In the YML file use pip install git+ssh://git@bitbucket.org/owner/repos.git
Like Sebastian Thomas likes this

I like the answer, apart from the fact that I now have to change the git user locally whenever installing dependencies. How would I set it up so it works locally as well?

Why do you have to change the local git user you shouldn't need to as you're adding a new SSH key to use projects on Bitbucket directly to the project not to a user?

You can still clone locally and use your own SSH key to authenticate as I'm doing exactly that.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

184 views 2 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you