# Use gitlab like github in PG

**URL:** <https://forum.babylonjs.com/t/use-gitlab-like-github-in-pg/6060>\
**Category:** Questions\
**Created:** [October 2, 2019, 2:19am UTC](https://forum.babylonjs.com/t/use-gitlab-like-github-in-pg/6060 "2019-10-02T02:19:17Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Givo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/givo/32/4968_2.png) [@Givo](https://forum.babylonjs.com/u/Givo)\
**Post date:** [October 2, 2019, 2:19am UTC](https://forum.babylonjs.com/t/use-gitlab-like-github-in-pg/6060/1 "2019-10-02T02:19:17Z")

</div>

Hi!

I know Babylon.js uses github, but I would like to use gitlab. I has a raw file link like github, but I tried to import this model into a pg like you would a github one but it didn’t work. Any ideas? or should I stick to github and upload when I can. (I can’t access github on my chromebook)

[https://gitlab.com/giv0/assets/raw/master/bhop\_test/bhop-map.babylon](https://gitlab.com/giv0/assets/raw/master/bhop_test/bhop-map.babylon))

> **[Sign in](https://gitlab.com/users/sign_in)**
>
> GitLab.com

link to file. It only has a couple of meshes.

---

<div class="post-metadata">

**Author:** ![Gijs](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gijs/32/44_2.png) [@Gijs](https://forum.babylonjs.com/u/Gijs)\
**Post date:** [October 2, 2019, 7:36am UTC](https://forum.babylonjs.com/t/use-gitlab-like-github-in-pg/6060/2 "2019-10-02T07:36:20Z")

</div>

Hi,

Aren’t there errors in the console, like cross-origin problems?

Or what http code is returned? I get 302, and it asks me to log in to view the file:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/6/68f8b8eb3d3732591ecdeb5f52a79612b6dbdd9b.png)

If that happens but you are logged in, maybe cross-origin credentials need to be enabled for XMLHttpRequest somewhere?:

> **[XMLHttpRequest.withCredentials](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials)**
>
> The XMLHttpRequest.withCredentials property is a Boolean that indicates whether or not cross-site Access-Control requests should be made using credentials such as cookies, authorization headers or TLS client certificates. Setting withCredentials has...

---

<div class="post-metadata">

**Author:** ![Null](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/null/32/1947_2.png) [@Null](https://forum.babylonjs.com/u/Null)\
**Post date:** [October 2, 2019, 8:09am UTC](https://forum.babylonjs.com/t/use-gitlab-like-github-in-pg/6060/3 "2019-10-02T08:09:46Z")

</div>

Your file is not accessible from the outside. Is your project a private one? In this case Gitlab makes it not possible for your repository or files to be visible. This is also the right behaviour otherwise your project wouldn’t be safe. You might want to convert your project into a public or protected one though this means it will be visible everywhere and everyone would be able to clone it.

I get a “page not found” when following your link 🙂 .

---

<div class="post-metadata">

**Author:** ![Givo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/givo/32/4968_2.png) [@Givo](https://forum.babylonjs.com/u/Givo)\
**Post date:** [October 2, 2019, 11:59am UTC](https://forum.babylonjs.com/t/use-gitlab-like-github-in-pg/6060/4 "2019-10-02T11:59:30Z")

</div>

@Null and @Gijs thanks for the responses. for me the link is available, but that’s only because It’s repository

If you notice the random parenthesis at the end of the link it is there to prevent the link pop up. It looks like it’ll take you to the sign in but took me to a gitlab forums issue like this one. Weird. I’ll remove the little parenthesis.

Oh. I never noticed this. ![25%20AM](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/1/13a184d055bb03c388eba0099636894c7443b515.png)

I made it public, and edited the settings so on project members can add and edit files (default is everyone can)

Made a pg, but still no luck 😕  
[https://playground.babylonjs.com/#N5PZ0G](https://playground.babylonjs.com/#N5PZ0G)

---

<div class="post-metadata">

**Author:** ![Gijs](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gijs/32/44_2.png) [@Gijs](https://forum.babylonjs.com/u/Gijs)\
**Post date:** [October 2, 2019, 12:19pm UTC](https://forum.babylonjs.com/t/use-gitlab-like-github-in-pg/6060/5 "2019-10-02T12:19:46Z")

</div>

I’m getting a 404 not found when I try the link now, but that’s when I’m not logged in since I don’t have an account. Is that expected?

---

<div class="post-metadata">

**Author:** ![Givo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/givo/32/4968_2.png) [@Givo](https://forum.babylonjs.com/u/Givo)\
**Post date:** [October 2, 2019, 12:22pm UTC](https://forum.babylonjs.com/t/use-gitlab-like-github-in-pg/6060/6 "2019-10-02T12:22:44Z")

</div>

I’m honestly not sure. So you could see the file when you’re logged in? I guess that’s half-right. I guess it’s a gitlab issue and not a bjs one.

I just signed out and I too get a 404.

---

<div class="post-metadata">

**Author:** ![Gijs](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gijs/32/44_2.png) [@Gijs](https://forum.babylonjs.com/u/Gijs)\
**Post date:** [October 2, 2019, 12:31pm UTC](https://forum.babylonjs.com/t/use-gitlab-like-github-in-pg/6060/7 "2019-10-02T12:31:18Z")

</div>

I actually meant that I didn’t see it, and I don’t have an account at all.

---

<div class="post-metadata">

**Author:** ![Givo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/givo/32/4968_2.png) [@Givo](https://forum.babylonjs.com/u/Givo)\
**Post date:** [October 2, 2019, 12:32pm UTC](https://forum.babylonjs.com/t/use-gitlab-like-github-in-pg/6060/8 "2019-10-02T12:32:11Z")

</div>

Oh. I guess a 404 would be all you would get then 😉

---

<div class="post-metadata">

**Author:** ![Vinc3r](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vinc3r/32/25340_2.png) [@Vinc3r](https://forum.babylonjs.com/u/Vinc3r)\
**Post date:** [October 2, 2019, 1:09pm UTC](https://forum.babylonjs.com/t/use-gitlab-like-github-in-pg/6060/9 "2019-10-02T13:09:22Z")

</div>

404 here too, so your asset is not public. I suppose that’s why playground can’t read it.

---

<div class="post-metadata">

**Author:** ![Givo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/givo/32/4968_2.png) [@Givo](https://forum.babylonjs.com/u/Givo)\
**Post date:** [October 2, 2019, 1:10pm UTC](https://forum.babylonjs.com/t/use-gitlab-like-github-in-pg/6060/10 "2019-10-02T13:10:44Z")

</div>

That’s odd though. It’s public.

![12%20AM](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/4/47f060d40a337cab08bb8289a521d76d193dfa8d.png)

But what I have done is made it like a website, so [giv0.gitlab.io/assets](http://giv0.gitlab.io/assets) will bring up a page. [https://giv0.gitlab.io/assets/bhop\_test/bhop-map.babylon](https://giv0.gitlab.io/assets/bhop_test/bhop-map.babylon) is the model file. So with that, IT WORKS!

[https://playground.babylonjs.com/#N5PZ0G#1](https://playground.babylonjs.com/#N5PZ0G#1)

---

<div class="post-metadata">

**Author:** ![Vinc3r](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vinc3r/32/25340_2.png) [@Vinc3r](https://forum.babylonjs.com/u/Vinc3r)\
**Post date:** [October 2, 2019, 1:43pm UTC](https://forum.babylonjs.com/t/use-gitlab-like-github-in-pg/6060/11 "2019-10-02T13:43:48Z")

</div>

Yep it’s ok now, I will add info on this doc page [Using External Assets - Babylon.js Documentation](https://doc.babylonjs.com/resources/external_pg_assets#using-external-assets-in-the-playground)

---

<div class="post-metadata">

**Author:** ![Givo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/givo/32/4968_2.png) [@Givo](https://forum.babylonjs.com/u/Givo)\
**Post date:** [October 2, 2019, 1:47pm UTC](https://forum.babylonjs.com/t/use-gitlab-like-github-in-pg/6060/12 "2019-10-02T13:47:57Z")

</div>

Oh cool! I can’t access github, and I think that would help a lot of people.  
 ![Cant%20get%20to%20github](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/5/5faf7164fd4c69513b235f060d82f1048dfcf05a.gif)

---

<div class="post-metadata">

**Author:** ![Vinc3r](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vinc3r/32/25340_2.png) [@Vinc3r](https://forum.babylonjs.com/u/Vinc3r)\
**Post date:** [October 2, 2019, 1:54pm UTC](https://forum.babylonjs.com/t/use-gitlab-like-github-in-pg/6060/13 "2019-10-02T13:54:56Z")

</div>

Weird, what can of security rule would block a website like Github? That said, I recently got a spam redirecting to a [github.io](http://github.io) website, redirecting itself to a scam website (but that’s not Github which is involved in the security issue here so…).

---

<div class="post-metadata">

**Author:** ![Givo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/givo/32/4968_2.png) [@Givo](https://forum.babylonjs.com/u/Givo)\
**Post date:** [October 2, 2019, 2:00pm UTC](https://forum.babylonjs.com/t/use-gitlab-like-github-in-pg/6060/14 "2019-10-02T14:00:49Z")

</div>

The reason github is blocked is because some kids were playing a game called [shell shockers](http://shellshock.io). The school blocked it with securly (the same thing blocking github). Now the day that happened everyone was kinda mad because they had a master google doc with game codes so a lot of kids in different classes were playing together. The day of the block I and other kids made an iframe of [shellshock.io](http://shellshock.io) on github. It worked and the link was put on the doc. The IT found out so github was blocked and I and the other kids who made iframes were asked to take them down. I took my main one down, but it lives on at [https://giv0.github.io/Games](https://giv0.github.io/Games). I have it iframed on an unmarked page. I have since moved my iframe site to [giv0.gitlab.io/CPG](http://giv0.gitlab.io/CPG). I haven’t updated it in a while. Also IT blocked some of the pages down to the internet level. securly can be bypassed. internet blocks can’t. That’s also why I made this: bit.ly/scan3t (scanttt stands for Securly CANT Touch This)

---

<div class="post-metadata">

**Author:** ![Vinc3r](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vinc3r/32/25340_2.png) [@Vinc3r](https://forum.babylonjs.com/u/Vinc3r)\
**Post date:** [October 2, 2019, 2:25pm UTC](https://forum.babylonjs.com/t/use-gitlab-like-github-in-pg/6060/15 "2019-10-02T14:25:27Z")

</div>

Ahah 😃 It reminds me of when I was in university, I had always a copy of Quake3 on my usb key as the game works by copy-paste (but deleting issues was made by… a - trolling not gamer - friend, not the IT which probably never known about Q3).

---

<div class="post-metadata">

**Author:** ![Givo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/givo/32/4968_2.png) [@Givo](https://forum.babylonjs.com/u/Givo)\
**Post date:** [October 2, 2019, 2:58pm UTC](https://forum.babylonjs.com/t/use-gitlab-like-github-in-pg/6060/16 "2019-10-02T14:58:28Z")

</div>

If you want some nostalgia, [http://www.quakejs.com/](http://www.quakejs.com/) isn;t blocked here because only I know about it. I like to listen to spotify and bhop around to kill time during lunch. 😆
