No such thing as a dumb question, just dumb assumptions Terminal would be the best I think. Open up and run
ls /Users/mattmclean024/.ssh/
No such thing as a dumb question, just dumb assumptions Terminal would be the best I think. Open up and run
ls /Users/mattmclean024/.ssh/
Ok, Iāve edited the file config according to the Heroku directions by adding this:
Host heroku.com
HostName heroku.com
IdentityFile /Users/mattmclean024/.ssh/id.heroku
IdentitiesOnly yes
Not sure if that is correct but when I run
git pull origin master
or
git push heroku master
I get an error:
Not a git repository (or any of the parent directories): .git
Do I need to run something before I run thisā¦?
Thank you!
I think you just need to make sure that you are in the mooc directory when you run git push. Iow, manage.py
, settings.py
and a bunch of other files should be there if you run ls
.
SUCCESS!
I fixed all of the merge errors and now I can make the edits and push the heroku master and they changes are reflected!
One thing that I did that is still unclear is that I seem to be pulling from the github repository and from the local files on my computer. Is that possible?
Should I be doing one or the other?
Glad itās working! The local files you have on you computer is a fully fledged copy of your repository on github, but the only person with access to it is you. So in actual fact, there are three repositories that you control, the one on github, the one on your computer and the one on the heroku instance. Pushing and pulling from any one of those are possible.
Thanks Dirk!
I just have one issue at the moment that Iām trying to resolve. The custom url is coming back as āBad Requestā 400 error.
I had help from my provider setting up the customer URL so that is all correct. In fact Iāve informed Herku and they think that it has something to do with a setting in the Mechanical MOOC. Did I miss a setting somewhere? Here was their last reply to my support ticket:
Hi Matt,
From what I can tell your application is configured and working as expected on Heroku. Itās reachable at http://lit-dawn-6639.herokuapp.com. Your custom domain appears to be setup properly too ā requests are being routed to your application. That said, youāre still getting a 400. The only thing that makes any sense is that thereās some setting in Mechanical MOOC that requires you to specify the custom domain youāre going to use (though their docs donāt mention it).
I recommend opening an issue with the creator/maintainer of Mechanical MOOC.
Hah, there is indeed a setting you need to modify!
Update the MOOC_DOMAIN
variable:
heroku config:set MOOC_DOMAIN=yourdomain.org
That should fix it!
Thanks Dirk.
It didnāt do it for me though. First, I typed the domain incorrectly. Then I entered it in correctly. Did I need to run any kind of removal command?
Also, the custom domain Iāve created is learn.yciw.net. Should I use
heroku config:set MOOC_DOMAIN=learn.yciw.net
or
heroku config:set MOOC_DOMAIN=yciw.net
thank you!
Sorry, just noticed this change wasnāt in git .
Add
ALLOWED_HOSTS += [MOOC_DOMAIN]
to settings.py file after the line:
MOOC_DOMAIN = os.environ.get('MOOC_DOMAIN', '')
Then add, commit and push to heroku:
git add settings.py
git commit -m 'Add custom domain to ALLOWED_HOSTS'
git push heroku master
To set the config, run:
heroku config:set MOOC_DOMAIN=learn.yciw.net
no other cleaning up needed.
That did it!! Thank you!
Iāll have something to share soonā¦
Also:: working through all of this has really helped me to better understand how Git and GitHub work. Iām forever grateful!
Glad I could be of help Looking forward to see what you have to share!