As of late, we met a sending issue in heroku python condition. 

In heroku python sending, it will execute pip introduce requirements.txt and introduce bundles in the record. Be that as it may, when you have a private bundle, everything goes muddled. 

Objective 

What we need to do is to introduce our private bundle which is on the github. Simply making one of the accompanying directions achievement: 

pip introduce git+https://github.com/my_account/myrepo.git 

pip introduce git+ssh://github.com/my_account/myrepo.git 

pip introduce git+https://{username}:{password}@github.com/my_account/myrepo.git 

The muddled thing here is that you would prefer not to submit any accreditation or secret key in git since it causes to numerous security issues. So how to let heroku realize the qualification in construct is the key-purpose of this issue. 

What is Python?

Outsider Buildpack Solutions 

Truth be told, there are some outsider buildpacks supporting setting github tokens or ssh-enters in the conditions: 

heroku-buildpack-github-netrc 

ssh-private-key-buildpack 

In any case, after our exchange, we choose not to utilize outsider buildpacks in light of the fact that the accompanying reasons 

support: everybody who joins related ventures has to know the buildpack and keep up them in the event that anything changes. 

security: we don't recognize what things occur in the event that we don't audit the code. 

(I've surveyed the code, them two are entirely basic and quite valuable. You can config your accreditations in condition factors and the buildpacks will set for your motivation.) 

Arrangement without Using Third-Party Buildpacks 

With some study on the heroku buildpacks, we found a decent arrangement that encourages us take care of this issue. To take in the arrangement, we have to find out about how heroku python buildpack functions first. Herkuo python buildpack will execute the accompanying directions all together: 

canister/distinguish 

canister/pre_compile 

canister/incorporate: in this progression, it will execute pip introduce - r requirments.txt here. 

canister/post_compile 

canister/discharge 

With the information, we attempted the means: 

The 10 Websites to Learn Python

Setup condition factors GITHUB_USER and GITHUB_PASSWORD 

Put the document canister/pre_compile with connection age code like: 

# !/container/slam 

reverberate "Create myrepo to requirements.txt" 

MY_REPO_GIT="git+https://${GITHUB_USER}:${GITHUB_PASSWORD}@github.com/my_account/myrepo.git" 

resound MY_REPO_GIT >> requirements.txt 

what's more, it will create private repos interface with client data to requirements.txt before executing receptacle/accumulate. At long last it can introduce everything your need with this arrangement. 

Fizzled Try 

We've endeavored to utilize setup.py to do customization in establishment yet it didn't work in light of the fact that heroku group figures setup.py can do everything and it's perilous if uncovering all form condition settings on it. 

Considerations 

It's a really fascinating voyage when knowing how the buildpack functions and making sense of the code for me haha. Yet, pre_compile appears a deplored highlight in heroku. Not certain when it will be evacuated.

Top 40 Python Interview Questions & Answers