MaxRev17
MaxRev17

Reputation: 393

VSTS Deploy with git push to a remote repository

I'm currently working with VSTS to host a git repository containing a WordPress site. I want to push this repository to a remote (wpengine) using SSH. I'm currently failing to see how to do this and having little success in building a release which can do this - there aren't any guides and the documentation for the plugins which look helpful here aren't very complete. Is there inbuilt functionality in VSTS release to allow this?

Upvotes: 0

Views: 588

Answers (1)

Jayowl
Jayowl

Reputation: 290

My work flow is to push up into a remote repository and pull down, ssh'd into your site. This always for you to commit back to a working version of your staging/production site if a bug is caught, it allows for a workflow where a pull request can be issued and reviewed if necessary and of course, a single point, where code can be reverted if necessary.

Here is my paraphrased workflow:

Create your own personal token on vsts.

These are the instructions: https://www.visualstudio.com/en-us/docs/setup-admin/team-services/use-personal-access-tokens-to-authenticate

  1. Click on your personnel icon(top right corner) on vsts.
  2. Click on Security
  3. Click on Personnel Access tokens
  4. Click on Add new
  5. Save the generated token

Create Alternate Authentication credentials

  1. Click personnel icon(top right corner) on vsts
  2. Click on Security
  3. Click on Alternate authentication credentials
  4. Make sure you fill in the ‘User name (secondary)’, this will be part of your security code

SSH TIME

  1. Open Putty or ssh client
  2. Type ‘cd html’ (this is where go daddy is stored)
  3. Type ‘git init’
  4. Type ‘git fetch remote https://(usernamesecondary):(personalaccesstokencode)@~~~~~.visualstudio.com/GitcloneUrl . . Or 'git remote add salessite https://(usernamesecondary):(personalaccesstokencode)@~~~~~.visualstudio.com/GitcloneUrl .'

**salessite is the name of the repo

  1. 'git pull salessite'
  2. 'git checkout –f branchname'

Be sure to have the ending period(.) as this will fill in the contents of the directory without the directory name.

Hope this is helpful. I working on a tutorial for using Visual Studio git setup coming up.

Upvotes: 1

Related Questions