Ionic Pro uses git to get access to the code you write in order to clone it in their cloud service - This is done so they can build your app on your behalf. An extract from their documentation:
Ionic Pro uses git to manage new app builds, push app updates, and more.
Before using Ionic Pro's git workflow, you must add a valid SSH key to your
account.
Ionic Pro's git service is not a replacement for your source code management
service of choice, such as GitHub or GitLab.
I would like to draw attention to the line: Before using Ionic Pro's git workflow, you must add a valid SSH key to your account.
. Ionic is nice enough help you with this if you do not have one already and generate one for you and link it up to your account, which I did. So thus far I can do some work and then commit and push my changes to the ionic git (to start the cloud build) using git push ionic master
; no issues.
I am now done prototyping and want to start serious development and add the project to my own Github repo. So i tried running git remote add origin git@github.com:AccountName/AppName.git
. This executed without a problem. However, when I tried to run git push -u origin master
, i get the error fatal: Authentication Failed
. Since Ionic setup the repo, it also setup the SSH keys used for authentication, but I have no idea how that process actually works. Currently my git bash environment is setup with my Github account set to my username and password, but I dont know how to link this SSH based repo to my Github username:password based repo. I used Git Bash and copied my public SSH Key into my GitHub SSH Keys:
And this is also the only public SSH key on my machine:
However I am still getting this error if I try to run git push -u origin master
: