Cloning and Installing remote repository changes into local system

Cloning and Installing remote repository changes into local system

Please anyone can help me to clone and install a remote repository into my local system.
I am good at cloning and pulling changes from remote repository.
But while I am trying to install that apps into my site , I am getting errors.
please help me to fix this.

Hello @Kiranmai,

To get any app, use the following command:

bench get-app --branch git-branch git_app_path

// Example
bench get-app --branch version-15 https://github.com/frappe/erpnext.git 

For app installation on a specific site, use:

bench --site your_sitename.com install-app erpnext

To update the erpnext app, navigate to the app directory and execute:

git pull upstream version-15

Ensure that you set the version as per the app requirements.

Here are some references for your guidance:

I hope this information proves helpful.

Thank You!

@NCP
I need install app which is cloned from a remote repository.

Example :

  1. Cloning that repo into our local sytem.
    —> git clone GitHub - amreenfatim/Hilltop

  2. cd Hilltop/

  3. git fetch

  4. git merge origin/main

  5. git pull origin main

  6. bench update --pull

  7. bench --site hilltop install-app hilltop

These are the steps followed to clone and install app from remote repository.
But iam getting error at 7 .

That error is : ` bench --site hilltop install-app Hilltop
Could not find app “Hilltop”:
No module named ‘Hilltop’
An error occurred while installing Hilltop: No module named ‘Hilltop’
Traceback with variables (most recent call last):
File “apps/frappe/frappe/commands/site.py”, line 462, in install_app
_install_app(app, verbose=context.verbose, force=force)
context = {‘sites’: [‘hilltop’], ‘force’: False, ‘verbose’: False, ‘profile’: False}
apps = (‘Hilltop’,)
force = False
_install_app = <function install_app at 0x7f1f65978900>
filelock = <function filelock at 0x7f1f6760b2e0>
exit_code = 0
site = ‘hilltop’
app = ‘Hilltop’
err = ModuleNotFoundError(“No module named ‘Hilltop’”)
File “apps/frappe/frappe/installer.py”, line 266, in install_app
app_hooks = frappe.get_hooks(app_name=name)
name = ‘Hilltop’
verbose = False
set_as_patched = True
force = False
sync_jobs = <function sync_jobs at 0x7f1f64a1dbc0>
sync_for = <function sync_for at 0x7f1f64a1ea20>
sync_customizations = <function sync_customizations at 0x7f1f65a8ade0>
sync_fixtures = <function sync_fixtures at 0x7f1f64a1ede0>
File “apps/frappe/frappe/init.py”, line 1570, in get_hooks
hooks = _dict(_load_app_hooks(app_name))
hook = None
default = ‘_KEEP_DEFAULT_LIST’
app_name = ‘Hilltop’
File “apps/frappe/frappe/utils/caching.py”, line 57, in wrapper
return_val = func(*args, **kwargs)
args = (‘Hilltop’,)
kwargs = {}
args_key = ********
func = <function _load_app_hooks at 0x7f1f65fa5f80>
File “apps/frappe/frappe/init.py”, line 1542, in _load_app_hooks
app_hooks = get_module(f"{app}.hooks")
app_name = ‘Hilltop’
hooks = {}
apps = [‘Hilltop’]
app = ‘Hilltop’
types = <module ‘types’ from ‘/usr/lib/python3.11/types.py’>
File “apps/frappe/frappe/init.py”, line 1408, in get_module
return importlib.import_module(modulename)
modulename = ‘Hilltop.hooks’
File “/usr/lib/python3.11/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
name = ‘Hilltop.hooks’
package = None
level = 0
File “”, line 1204, in _gcd_import
name = ‘Hilltop.hooks’
package = None
level = 0
File “”, line 1176, in find_and_load
name = ‘Hilltop.hooks’
import
= <function _gcd_import at 0x7f1f6774fd80>
module = Traceback (most recent call last):
File “env/lib/python3.11/site-packages/traceback_with_variables/core.py”, line 222, in to_cropped_str
raw = print
(obj)
^^^^^^^^^^^
File “apps/frappe/frappe/utils/init.py”, line 329, in dict_printer
if key in v:
^^^^^^^^
TypeError: argument of type ‘object’ is not iterable

File “”, line 1126, in find_and_load_unlocked
name = ‘Hilltop.hooks’
import
= <function _gcd_import at 0x7f1f6774fd80>
path = None
parent = ‘Hilltop’
parent_spec = None
File “”, line 241, in _call_with_frames_removed
f = <function _gcd_import at 0x7f1f6774fd80>
args = (‘Hilltop’,)
kwds = {}
File “”, line 1204, in _gcd_import
name = ‘Hilltop’
package = None
level = 0
File “”, line 1176, in find_and_load
name = ‘Hilltop’
import
= <function _gcd_import at 0x7f1f6774fd80>
module = Traceback (most recent call last):
File “env/lib/python3.11/site-packages/traceback_with_variables/core.py”, line 222, in to_cropped_str
raw = print
(obj)
^^^^^^^^^^^
File “apps/frappe/frappe/utils/init.py”, line 329, in dict_printer
if key in v:
^^^^^^^^
TypeError: argument of type ‘object’ is not iterable

File “”, line 1140, in find_and_load_unlocked
name = ‘Hilltop’
import
= <function _gcd_import at 0x7f1f6774fd80>
path = None
parent = ‘’
parent_spec = None
spec = None
builtins.ModuleNotFoundError: No module named ‘Hilltop’
`

But i have that module in my local system .
eg : ls
erpnext frappe frappe_whatsapp Hilltop hilltop_custom hrms india_compliance payments pdf_on_submit

Hi @Kiranmai,

Please avoid cloning the application.

If you wish to clone the application, use the “get-app” command.

bench get-app --branch main https://github.com/amreenfatim/Hilltop.git

This works in a way similar to a clone.

Please again check the documentation.

Thank You!

@NCP I tried that one also.
But no use.

The process i mentioned above is working sometimes.
By using that process i cloned another repository.
But now it is not working. :expressionless:

After Some Research I Just Saw That Your Repository project,toml needs some fix

Please Accept The Changes Then Use @NCP Instructions.

I Hope it helps.

1 Like

@mmfarah Okay…All things works fine but i will do.

Thanks in advance :slight_smile:

@NCP @mmfarah

Thank you ::))

I successfully cloned and installed remote repository changes into local system.

Thank you all for your time.