Simple way of updating code on VPS from glitch

I was thinking of adding a command that updates the code on the VPS with the one on glitch, I was thinking of

  • Wiping the whole bot directory (except db)
  • Cloning glitch git (not sure where to get that from right now) into the wiped area
  • Restart bot

Could anyone provide me with a rough guide on doing so? Thanks

(My preferred method of communicating with both vps and glitch is express)

1 Like

Rephrasing question, is there a way of getting the git of the project other than uploading the project to github?

@SpeedyCraftah in addition to exporting and importing to GitHub, you can click Tools ^ in the editor, then selecting Git, Import, Export. There you’ll find a URL you can plug into git clone or any other git access tool. Hope that helps!

When cloning my glitch repo using the url (https://api.glitch.com/git/myproject)
It asks me to authenticate (username and password)
I am unsure what to provide. I have tried inputting username as my github username and password as my github password but it did not work

Here’s one of my previous answers on this, this should be able to solve your problem :slight_smile:

To fetch your token you can open the developer console and run this:

JSON.parse(localStorage.cachedUser).persistentToken

I’m a bit unsure, if it is the persistentToken property or the gitAccessToken. Either way, here is how to fetch both:

JSON.parse(localStorage.cachedUser).persistentToken
JSON.parse(localStorage.cachedUser).gitAccessToken
3 Likes

Thanks alot! The persistent token worked

I’m very happy to help :slight_smile:

what do you mean with developer console?
Can you please specify, is it glitch console?

The developer console is a tool in your browser, it gives you the ability to inspect the HTML node tree and monitor your network activity and so on. It also provides you a console that allows you to execute JavaScript on the document’s (page’s) node tree. The console will get access to the document’s document, window and localStorage objects (and more). On any browser based on Chromium the developer tools are usually accessible through F12 key or a combination of these keys Command or Control+ SHIFT + I. You’ll notice that a new panel will show up in your browser. Usually the default tab on that panel is the Inspector, you can navigate to the console by pressing on the console title, if that doesn’t appear, press on double right arrow button and then press on the console button there.