Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terminus build:env:push Does not work with private git server? #448

Open
benjaminbradley opened this issue Apr 26, 2022 · 5 comments
Open

Comments

@benjaminbradley
Copy link

We are attempting to push code to a Pantheon multidev environment, after checking it out from a repository on a private github instance. It used to work on an older version of terminus 2.x, but after upgrading to terminus 3.x, we are getting an error regarding the source repository, which should not be a part of the deployment process at this point as the code is being pushed to Pantheon's public repo, not the private source repo.

Expected behavior

terminus build:env:push ${SITE_ID}.MULTIDEV_NAME
 [notice] Pushing code to MULTIDEV_NAME using branch BRANCH_NAME.
 [notice] Running git -C /path/redacted remote add pantheon ssh://[email protected]_ID.drush.in:2222/~/repository.git

(expected terminus to push the site to the remote environment)

Actual behavior

 [error]  Could not figure out which git repository service to use with https://PRIVATE_GITHUB/PATH/REPO.git.

Steps to reproduce the behavior

Repository is hosted on a private enterprise github instance.
Check out repository, run build, etc.

terminus auth:login '--machine-token=****'
terminus build:env:push ${SITE_ID}.MULTIDEV_NAME
@benjaminbradley
Copy link
Author

These appear to be related:
#366
#414

@benjaminbradley
Copy link
Author

Resolution suggested via PR here: #449

@acastro2
Copy link

acastro2 commented Dec 29, 2022

Is any chance of the above PR getting merged?

@namespacebrian
Copy link
Contributor

namespacebrian commented Jan 5, 2023

Tracking private Bitbucket instance support internally as FEAT-1077. There is not an ETA at this time.
Tracking private Github instance support internally as FEAT-1078. There is not an ETA at this time.

Changes were requested in #449 on May 2, 2022.

@ryanshoover
Copy link

Until this gets fixed, there's a simple workaround that works for some of the build-tools commands like env:push (those that don't need to interact with GitHub).

Changing the origin url "tricks" build tools into thinking it's a GitHub repo.

# Set origin to a fake github url
git remote set-url origin [email protected]:fake-org/fake-repo.git

# Push with terminus
terminus build:env:push

# Reset origin url
git remote set-url origin [email protected]:org/repo.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants