DEV Community

Cover image for How to link your GitLab account to StackEdit?
Max White
Max White

Posted on • Updated on

How to link your GitLab account to StackEdit?

First. Go to the StackEdit and click in "Start Writing".

Step 1

After waiting for StackEdit to load, this should be waiting for you.

Just click "Skip" because we don't need a tutorial on how StackEdit works for now.

Step 2

Then go to the StackEdit logo located at the top right and click on it.

Step 3

This should appear to you.

Just click on "Workspaces". We'll talk about "Sign in with Google" later in this post.

Step 4

Click in "Add a GitLab workspace".

Step 5

This should appears to you.

Step 6

Now, you need go to the GitLab. There, click in your profile icon on top right corner.

Top right corner is the latest fashion trend! ๐Ÿ˜‰

Step 7

This should appears to you.

Just click in "Settings".

step 8

This should appears to you.

Click in "Applications".

Step 9

Under "Add new application", in "Name", well, type a name for your application. Something like "StackEdit" (duh) is fine. I will type "StackEdit2" because I already made this.

Step 10

In "Redirect URI", type https://stackedit.io/oauth2/callback.

Step 11

Why? ๐Ÿคจ

Well, StackEdit said this was your Redirect URI.

Where? ๐Ÿคจ

Here.

Step 11-Why

Then, check the box "api".

Of course, you can check all the boxes you want.

This is not gonna break StackEdit.

But StackEdit will only need the "api" box.

And checking checkboxes beyond the "api" box is dangerous.

Because that will give more permission than StackEdit needs.

And then, if a bad person ends up having access to your application ID and all, they can do much more than simply commit to one of your repositories.

Like I said, It is recommended that you only check the "api" checkbox.

Step 12

Now, scroll down unitl the "Save application" button, and click on him.

As you see, I already have a application called "StackEdit" so this is why I called this "StackEdit2", like I said before.

Step 13

This should appears...

Copy the "Application ID" code from GitLab to the "Application ID" field in the StackEdit.

Step 14

Step 15

Wait, why don't cover up your code? This is dangerous?

Yes it is. But I will delete the app after doing this tutorial, so I think it's okay as it won't be valid anymore.

If you say ๐Ÿ˜

Now you will get the URL of the page where the Application ID was and paste it into the "GitLab URL" field.

I'm not gonna give you guys a screenshot, because my tabs are... A little... Private... ๐Ÿ˜…

Your dirty furry ๐Ÿ˜

It's something like: https://gitlab.com/oauth/applications/146425.

Step 16

Now click in the "OK" button. When you click the "OK" button, it will open a page like this...

Step 18

Just click in "Authorize" button.

Step 19

Ta-dah! Now everything is set up! It will return to StackEdit and ask for a repository name. Now. Every time you edit or create a Markdown file within StackEdit, it will be committed into the repository you have chosen.

Didn't you say you would explain about "Sign in with Google"? ๐Ÿ˜ถ

Oh! Yes! Of course! It's simple!

"Signing in with Google" will cause StackEdit to store your credentials and create a workspace for you. That way, you don't have to "do everything you do here" every time you restart StackEdit or delete your cookies. However, the Google workspace cannot be accessed from anywhere other than StackEdit. Unlike GitLab, where you can access your files both from the GitLab repository you choose, as well as from StackEdit.

That's it!

Thanks for reading and a fun fact: You known the red fox likes the white wolf?

Top comments (1)

Collapse
 
rplaurindo profile image
Rafael Pereira

Unfortunately it stopped working currently.