Install apps from GHE
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
Issue: Feature Request
**Is your feature request related to a problem? Please describe.**
When using `bench get-app` and Github Enterprise URLs, the clone fails. This seems to be because there is logic looking for a `git` or `https` in the beginning of the URL which isn't there in GHE. GHE URLs look like: businessname@businessname.ghe.com:org-name/repo.git
The error thrown is that "businessname is not found under frappe or erpnext"
**Describe the solution you'd like**
Ideally, get-app would simply allow an enterprise URL; if it's cloneable by Git it should be get-app-able. [EDIT] Alternatively, update the developer environment setup documentation to cover the work-around I added below.
**Describe alternatives you've considered**
I have tried several different approaches. Cloning myself and then manually running commands to install dependencies and update apps.txt and so on failed when I tried my next `bench setup requirements` as it seems to still want to hit the git repo of my GHE repository and fails with the error "Not enough values to unpack, expected 3, got 2" and pointing to code that looks like it is trying to interact with git URLs.
I tried cloning locally to a different location and then using `get-app my-custom /path/to/my/thing --soft-link` which I had read works, only to have the exact same issue as above, with the "expected 3, got 2" error. Something is still interested in my upstream URL and is unhappy that it doesn't look like what it expects.
[EDIT] There is an alternative that I tried and got to work using git's insteadOf feature.
```
$ git config --global url.business-name@business-name.ghe.com:ORG.insteadOf "git@github.com:ORG"
```
After doing this the `bench get-app` command works as expected since bench sees the `git@github.com:XXX` pattern it's looking for, but git knows how to map that to the GHE private repo.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the bench get-app entry point and reproduce the failure using the GHE URL format shown in the issue. Trace how that URL is handled again during bench setup requirements, including the apps.txt and upstream references mentioned. Done means cloneable GHE URLs work through get-app and subsequent dependency setup without the unpacking or repository lookup errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100