# Need Help with Github Tutorial

**URL:** <https://forum.freecodecamp.org/t/need-help-with-github-tutorial/168881>\
**Category:** freeCodeCamp Contributors\
**Tags:** contributing\
**Created:** [January 15, 2018, 5:24pm UTC](https://forum.freecodecamp.org/t/need-help-with-github-tutorial/168881 "2018-01-15T17:24:09Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdityaOli](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/adityaoli/32/160289_2.png) [@AdityaOli](https://forum.freecodecamp.org/u/AdityaOli)\
**Post date:** [January 15, 2018, 5:24pm UTC](https://forum.freecodecamp.org/t/need-help-with-github-tutorial/168881/1 "2018-01-15T17:24:09Z")

</div>

Hi there,

I have been trying to create a tutorial for github for FCC. But I need a lot of help for the purpose.  
I am done with the skeleton of the page, but once the code is ready(Node+Passport+Express+Mlab + FrontEnd), how should I deploy it for campers to review and provide feedback? I mean, I could have gone with glitch but it cannot render something like :

```auto
<% if (user) { %>
Log out
<% } else { %>
Login
<% } %>

```

Glitch gives multiple errors while trying to render this.Can anyone please help me out if there’s any way I could proceed with deploying the code?

---

<div class="post-metadata">

**Author:** ![r1chard5mith](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/r1chard5mith/32/160542_2.png) [@r1chard5mith](https://forum.freecodecamp.org/u/r1chard5mith)\
**Post date:** [January 16, 2018, 12:38am UTC](https://forum.freecodecamp.org/t/need-help-with-github-tutorial/168881/2 "2018-01-16T00:38:21Z")

</div>

I haven’t used Glitch but that stack is easy to stand up on Heroku. Curious why you would need a db and auth if it’s just a tutorial, though.

---

<div class="post-metadata">

**Author:** ![Dereje1](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dereje1/32/63598_2.png) [@Dereje1](https://forum.freecodecamp.org/u/Dereje1)\
**Post date:** [January 16, 2018, 1:06am UTC](https://forum.freecodecamp.org/t/need-help-with-github-tutorial/168881/3 "2018-01-16T01:06:59Z")

</div>

Glitch is not that different from heroku in uploading your codebase. A couple differences are that on glitch you don’t use a CLI on your local machine like you do with heroku, instead you just import the code using glitch’s web interface directly from your linked github account, additionally your private api keys should be in .env file that is in the project’s main directory on glitch, whereas on heroku, i set the keys in the web dashboard using app\>settings\>Config Variables (you can also set it with the CLI)

@AdityaOli post your github repo here, and also post the errors glitch is giving you

---

<div class="post-metadata">

**Author:** ![AdityaOli](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/adityaoli/32/160289_2.png) [@AdityaOli](https://forum.freecodecamp.org/u/AdityaOli)\
**Post date:** [January 16, 2018, 10:54am UTC](https://forum.freecodecamp.org/t/need-help-with-github-tutorial/168881/4 "2018-01-16T10:54:47Z")

</div>

@r1chard5mith What I am actually trying to do is to have two repos on user’s github account, say “local” and “remote”. Whatever is asked of the user to implement in the local repo, he/she also needs to merge it to the remote repo. That is why, to save sessions, repo information, progress etc, I thought using a db would be a great idea.

---

<div class="post-metadata">

**Author:** ![r1chard5mith](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/r1chard5mith/32/160542_2.png) [@r1chard5mith](https://forum.freecodecamp.org/u/r1chard5mith)\
**Post date:** [January 16, 2018, 11:25am UTC](https://forum.freecodecamp.org/t/need-help-with-github-tutorial/168881/5 "2018-01-16T11:25:07Z")

</div>

So, not _just_ a tutorial, but in fact a learning platform that stores users and progress. Quite ambitious for your first live app. Good luck!

---

<div class="post-metadata">

**Author:** ![AdityaOli](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/adityaoli/32/160289_2.png) [@AdityaOli](https://forum.freecodecamp.org/u/AdityaOli)\
**Post date:** [January 16, 2018, 5:11pm UTC](https://forum.freecodecamp.org/t/need-help-with-github-tutorial/168881/6 "2018-01-16T17:11:52Z")

</div>

Hi @Dereje1,

> **[AdityaOli/FreeCodeCamp-Github-Tutorial](https://github.com/AdityaOli/FreeCodeCamp-Github-Tutorial)**
>
> Contribute to AdityaOli/FreeCodeCamp-Github-Tutorial development by creating an account on GitHub.

This is the link to the Github Repository. I am unable to import it into glitch as well, It says “Arg, something went wrong. Try again? :@”

I have not uploaded .env file data, but have uploaded the variables that need to be declared and initialized in the .env file in the similar format.

---

<div class="post-metadata">

**Author:** ![Dereje1](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dereje1/32/63598_2.png) [@Dereje1](https://forum.freecodecamp.org/u/Dereje1)\
**Post date:** [January 16, 2018, 11:31pm UTC](https://forum.freecodecamp.org/t/need-help-with-github-tutorial/168881/7 "2018-01-16T23:31:24Z")

</div>

Ok, taking a look at it here in a few, just to verify , everything works as excepted locally on your machine right ? you are just having an issue when deploying it to glitch correct?

---

<div class="post-metadata">

**Author:** ![AdityaOli](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/adityaoli/32/160289_2.png) [@AdityaOli](https://forum.freecodecamp.org/u/AdityaOli)\
**Post date:** [January 17, 2018, 5:17am UTC](https://forum.freecodecamp.org/t/need-help-with-github-tutorial/168881/8 "2018-01-17T05:17:25Z")

</div>

Yes. It works completely as expected on my local machine.

---

<div class="post-metadata">

**Author:** ![Dereje1](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dereje1/32/63598_2.png) [@Dereje1](https://forum.freecodecamp.org/u/Dereje1)\
**Post date:** [January 17, 2018, 7:59am UTC](https://forum.freecodecamp.org/t/need-help-with-github-tutorial/168881/9 "2018-01-17T07:59:05Z")

</div>

Ok I tried to link your project in github to glitch and you have several warnings re: bootstrap requiring you to also load jquery as it is a dependancy, but that is not what is causing you problems, the main error it is reporting is this,

`/tmp/. __glitch__ start.sh: line 1: null: command not found`

the reason is because glitch needs a scripts start command in the package.json file similar to this format:

```auto
"scripts": {
    "start": "node xyz"
  }

```

where xyz is where your application should start, instead you are using nodemon in dev mode (understanble since you are developing locally, I use nodemon too)

so I changed this in your package.json file

```auto
"scripts": {
    "dev": "nodemon server.js"
  }

```

to this

```auto
"scripts": {
    "start": "node server.js"
  }

```

And it seems to take it BUT, now i get a different error

`if (!options.clientID) { throw new TypeError('OAuth2Strategy requires a clientID option'); }`

The reason is obvious, I don’t have your secret client id , so what I recommend is to do the above change yourself then throw in the client id in your .env file and see if it works.

FYI, under your profile in glitch click on ‘Logs’ to see what the exact errors and warnings you are getting.

---

<div class="post-metadata">

**Author:** ![AdityaOli](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/adityaoli/32/160289_2.png) [@AdityaOli](https://forum.freecodecamp.org/u/AdityaOli)\
**Post date:** [January 17, 2018, 3:40pm UTC](https://forum.freecodecamp.org/t/need-help-with-github-tutorial/168881/10 "2018-01-17T15:40:12Z")

</div>

So now I have the application up and running. Thanks to @Dereje1 and @r1chard5mith.

#### Mistakes:

1. I had to remove nodemon as mentioned above.
2. Another thing as that I was importing the wrong way. It should have been ‘user/repo’ but i was pasting the entire clone url there.

#### Target:

What I have been able to do till now is here: [https://freecodecamp-github-tutorial.glitch.me/](https://freecodecamp-github-tutorial.glitch.me/)

1. The left and right hand side are for the github repos ‘local’ and ‘remote’ respectively Currently I am triyng to build a logic like if I have the directory structure like

```auto
hackerrank-sdk/hackerrank/HackerRankAPI.py
hackerrank-sdk/hackerrank/ __init__.py
hackerrank-sdk/hackerrank/testing.py
hackerrank-sdk/setup.cfg

```

so now I am trying to create a folder structure for the same. So there should be a parent folder `hackerrank-sdk` and on clicking that, all the files and folders should appear in that folder.

1. the console button in the footer opens the console where the commands taken as input will be tried.
2. The login button has been implemented using three-legged auth strategy. and it works fine now.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 17, 2021, 7:59pm UTC](https://forum.freecodecamp.org/t/need-help-with-github-tutorial/168881/11 "2021-01-17T19:59:54Z")

</div>

Closed on January 17, 2021, 7:59pm UTC


