Devyzer
Start free

Existing customer? Sign in

back to the blog

Deploy your private repository to Devyzer Written on . Posted in tutorials.

Deploy your private repository to Devyzer

Devyzer is a tool that allows you to deploy your web applications directly from your GIT repositories to sandboxes with easy steps. Sandboxes can be used for testing and sharing with stakeholders, without the need to setup hosting or cloud accounts.

Needless to say, Devyzer doesnt store any private information about your projects or repositories, any credentials supplied wil be used to explicitly clone the projects to the sandboxes.

Below we decscribe the steps needed to deploy Laravel projects for now, more frameworks will be supported in the near future.

There are four ways to give Devyzer access to your repos:

  • Allow devyzer to access your repository by url
  • Authenticate using SSH (to be supported soon)
  • Authenticate via Devyzer app for Gitlab, Bitbucket and Github (to be supported soon)
  • Authenticate via Https

You can deploy any private repository via https repository url by adding the username and password in the url as per the example below:

git clone https://username:password@example.com/{user-name}/{project-name}.git


So you will need to generate a username and password for your repository in order to devyzer to access it for depoyment.

 

GitHub steps:

  1. From the upper-right corner of any page, click your profile photo, then click Settings.
  2. From the left sidebar, click Developer Settings.
  3. From the left sidebar, click Personel access tokens.
  4. From the right-upper corner, click Generate new token.
  5. If prompted, confirm your GitHub password.
  6. Give your token a descriptive name.
  7. Finally, click the Generate token button to generate the token
  8. Confirm the checkmark: Click the copy to clipboard icon to copy the token to your clipboard.
    For security reasons, after you navigate off the page, you will not be able to see the token again.
  9. The generated token can be used with the git URL. You can use the token when cloning like this:
    git clone https://c904a061a164cb45a9abf5dbc6c8b8f4c16d6dd7@github.com/JBCodeWorld/test.git

  Reference: https://clarusway.com/passwordless-usage-of-private-git-repositories/


GitLab steps:

Use a Deploy Token, A deploy token allows you to access a repository without your user name and password or ssh keys, and it is setup per repository or group: 

  1. Sign in to your GitLab account.
  2. Go to the project (or group) you want to create deploy tokens for.
  3. Go to Settings > Repository.
  4. Expand the Deploy tokens section.
  5. Choose a name, expiry date (optional), and username (optional) for the token.
  6. Choose the desired scopes.
  7. Select Create deploy token.
  8. You can clone using the following url:
    https://<username>:<deploy_token>@gitlab.example.com/tanuki/awesome_project.git

  Reference: https://docs.gitlab.com/ee/user/project/deploy_tokens/