Problems linking Azure and VSTS?

Posted by on Apr 6, 2017 in Azure, Cloud

I recently hit a minor road-block when attempting to link a VSTS account to an Azure account to do automated deployment upon checkin to a given branch. For some reason Azure simply would not “see” my VSTS account and therefore projects from the portal. After a little bit of searching online I found and followed this article on the Kudo blog. Specifically it states that you need to be at least a project administrator, it must be GIT source controlled project and you need to check if you can create service hooks (to validate the given permissions). All of these were fine so I continued searching. I then stumbled upon this article which solved the problem for me. It seems you also need to be the project OWNER, which I was not. Thankfully, changing ownership is a doddle so I switched owners using the details in the post I just linked to and it still didn’t show up. Finally, I switched back to the old azure portal and tried linking my accounts there. Voila! It worked. Why the new Azure portal couldn’t see the VSTS account I don’t know, but as soon as they were linked in the old portal everything started working in the new one. It seems we may be stuck with two portals for a little while...

Read More »

Pushing from GIT to Heroku

Posted by on May 30, 2014 in Cloud, Other

Pushing from GIT to Heroku I recently attempted to publish a small node.js application from my local machine under source control using git, to Heroku (http://www.heroku.com). While this should have been as simple as entering: git push heroku master 1 git push heroku master I was met with the error: Permission denied (publikey) fatal: Could not read from remote repository. Public key issues are never good Public key issues are never good – even less so when the error message is prefixed with ‘fatal’ 😉 The error message seemed quite clear and explicit – it seems that my local public key didn’t match that on Heroku and thus I could not authenticate. To resolve this I deleted the existing public key in my .ssh folder (located at c:\users\\.ssh\ and generated a new one. From a command prompt: cd c:\program files (x86)\git\bin ssh-keygen.exe 12 cd c:\program files (x86)\git\binssh-keygen.exe when prompted for the path I put in the path to the .ssh folder as follows: Enter the file in which to save the key: c:\users\lee\.ssh\id_rsa I left the password blank as this is a private machine and I’m too lazy to re-enter the pass-phrase every session. This generated a new key for me. Adding to the local key store From there I needed to add the key into the local git keystore. This is needed to ensure that both Git and eventually Heroku, are using the exact same key. To accomplish this open up a bash shell (after you’ve installed git for windows you can right click any folder and select ‘Git Bash’) and enter: $ eval `ssh-agent -s` $ ssh-add 12 $ eval `ssh-agent -s`$ ssh-add note the back-tick (above the tab key!) not apostrophe’s and also notice the eval statement. ssh-agent alone will not work Assuming you didn’t rename your key when generating (id_rsa), ssh-add will look for the default key name in the default key path. If you did change the file name you’ll need to pass this in as a parameter. If it worked, you should be prompted with: Identity added: /c/Users/lee/.ssh/id_rsa Sync the keys with Heroku Now you have a brand new key added into your local git you can start migrating this to Heroku. If you have no other keys in Heroku, run the following commands from a command prompt: heroku restart heroku keys:clear heroku keys:add 123 heroku restartheroku keys:clearheroku keys:add Assuming all went well and the output of the last step was: Uploading SSH public key …done then you should be good to go. Executing heroku:keys 1 heroku:keys should show your newly created and uploaded key. Ready, set, go! Finally, git push herku master 1 git push herku master should now succeed and you’re good to...

Read More »