Adil Malik Adil Malik - 1 year ago 90
Git Question

Heroku run cp -r is trying to run on the wrong git remote

I tried to run this command on Heroku.

heroku run cp -r /app/.heroku/python/lib/python2.7/site-packages/django/contrib/admin/static/admin doctor_app/static/

And I got this error.

▸ Error: Could not find git remote /app/.heroku/python/lib/python2.7/site-packages/django/contrib/admin/static/admin in /home/adil/Code/mezino/DocTest/doctor_app
▸ remotes: heroku

Any Idea, Why ?

Answer Source

Heroku uses different git remotes to separate environments, so I believe it is interpreting the -r flag in your command as the remote to run on. Sticking the command in quotes will force it to interpret that whole block as one argument.

heroku run "cp -r /app/.heroku/python/lib/python2.7/site-packages/django/contrib/admin/static/admin doctor_app/static/"

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download