How do I get my MOOC as my own repository so that I can edit the pages?

One other quick question.

I’m a bit of a github newbie. How do I get my MOOC as my own repository so that I can edit the pages? I seem to have forked the main Mechanical MOOC repo but I want to be editing my own site…is that right?

To modify the contents of the site for the Mechanical MOOC, you need to edit the django templates, they live in a sub-folder called templates. Once you’ve updated them, you will need to commit them to github and push the repository to heroku again. Iow.

Edit templates/signup/index.html to update the home page

Then commit your changes:

git add templates/signup/index.html
git commit -m 'Update homepage'

Then push to heroku (assuming you are working on the master branch in your repository):

git push heroku master

We think about the Mechanical MOOC more as a signup and grouping tool rather than a place to host content. For content Course is a Box is better suited.

Thanks Dirk-

The how-to of updating and committing changes makes sense, I think I’m just not doing some simple things in Github correctly. When I make the changes and then run the commands in Heroku none of the edits are made.

I’m not experienced with Github. Here’s what I did:

  1. I forked the mechanical MOOC from my site by clicking the banner.
  2. Then in Github I clicked fork.
  3. This created a repository that begins with my Github user name: matt5834/mechanical-mooc
  4. I made the edits to the template file on this repo.

Is this correct?

I have not set up the Subdomain name on Heroku yet. Maybe this is why the changes aren’t taking hold?

Thank you!

When I run those commands to commit the changes I get this:

On branch master
Your branch is up-to-date with ‘heroku/master’.

nothing to commit, working directory clean

This is probably a good sign, means your changes are on heroku.

You don’t need to have a custom domain before things will work, Heroku will setup a subdomain for you at heroku that should work. You can view your site by running:

heroku apps:open

That should open up a new window/tab in your browser with your version of the site. Or you can run

heroku apps:info

That should give you the “Web URL” that you can manually use to go to the site.

Thank you, yes I’m able to do all of that and it works well!

Here is my app

The edits I’m making on GitHub aren’t displaying. (see above for how I’ve made the edits)

Thank you!

Are you making the changes directly on GitHub? In that case, try running

git pull origin master

before you push your changes to heroku

I am making changes on GitHub. Should I do it another way?

When I run git pull origin master

I get:

fatal: ‘origin’ does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I just realized that if you started with

git clone

your origin will point to p2pu’s repository. Run

git remote set-url origin

to correct this. Then run git pull origin master and then push your changes to heroku: git push heroku master.

Thanks Dirk. When I run:

git remote set-url origin

I get the:

fatal: No such remote ‘origin’

My terminal is in: matt-mcleans-MacBook-Air-3:lit-dawn-6639 mattmclean024$

Is this the correct place to run this command?

What do you get if you run

git remote -v

I get:

heroku (fetch)
heroku (push)

Ok, that’s a little weird, but run

git remote add origin

Then do a

git pull origin master


git push heroku master

Btw, you’re doing a great job figuring things out!

Thank you! and thank you so much for your help! I’m really excited about this! I know I’m in way over my head but it’s fun trying to figure this out.

I ran those commands and it worked!! My changes are showing!

Now, after I make changes on GitHub should I run:

git add templates/signup/index.html
git commit -m ‘Update homepage’

and then

git push heroku master

Is that right?

Or should I run the 3 commands above?

If you are making the updates to the templates on GitHub using the web based interface all you need to do is

git pull origin master


git push heroku master

to make your updates live!

Btw, being in over your head is the only way to learn :smile:

Hi Dirk-
I’m having updating my mechanical mooc for some reason and I think it has something to do with my ssh key. (I’m looking at this for help:

When I run: ssh -v

I get:

OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to [] port 22.
debug1: Connection established.
debug1: identity file /Users/mattmclean024/.ssh/id_rsa type 1
debug1: identity file /Users/mattmclean024/.ssh/id_rsa-cert type -1
debug1: identity file /Users/mattmclean024/.ssh/id_dsa type -1
debug1: identity file /Users/mattmclean024/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version Twisted
debug1: no match: Twisted
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Server host key: RSA 8b:48:5e:67:0e:c9:16:47:32:f2:87:0c:1f:c8:60:ad
debug1: Host ‘’ is known and matches the RSA host key.
debug1: Found key in /Users/mattmclean024/.ssh/known_hosts:9
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/mattmclean024/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Authentications that can continue: publickey
debug1: Trying private key: /Users/mattmclean024/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey).

I think I may need to enter my ssh password somehow but I can’t figure out how to do that.
Thank you!

Hey @matt5834

Your best bet is to follow through with the instructions at I suspect your GitHub key and the key used for Heroku got confused at some point.

Try listing your Heroku keys using

heroku keys

and look for one of the keys in the output when you run

ssh -v

iow, the content of the file “/Users/mattmclean024/.ssh/id_rsa” should contain a key listed but heroku

Thanks Dirk.
I’ve been trying to carry out this part of the directions:

When I get to the bit about:
"You can modify the SSH mechanism to send a different key depending on the host by creating or modifying a .ssh/config file. The following snippet will ensure that when SSH communicates with the domain, that our Heroku certificate is offered instead:

  IdentityFile /Users/jonmountjoy/.ssh/id.heroku
  IdentitiesOnly yes

I’m replacing the default info with my info:

  IdentityFile /Users/mattmclean024/.ssh/id.rsa
  IdentitiesOnly yes

My question is: I do not know how to create or modify the .ssh/config file in order to put in the above snippet.

To modify that you need to edit the file /Users/mattmclean024/.ssh/config.

I suspect that the IdentityFile needs to be something other than /Users/mattmclean024/.ssh/id_rsa, since that file is being used in the log you posted above and you couldn’t log in. Have a look what other files are in the '/Users/mattmclean024/.ssh` folder.

Ok, I understand.
At the risk of asking a really dumb question: how do I “see” what’s in that folder…?
In the Terminal or somewhere else?

Thank you!