How can I link with ionic pro?


#1

I had upgraded to the latest version of ionic and so I follow the step in dashboard.
I started to connect to ionic pro by

ionic link --pro-id {my app id}

I followed the step to generate a new ssh key under my .ssh folder and it created mypath.ssh\ionic with anonymous and anonymous.pub.

And then I followed “Push your code up to the dashboard!” by enter

git push ionic master

It showed

fatal: 'ionic' does not appear to be a git repository
fatal: Could not read from remote repository.

So I googled and find out that
https://forum.ionicframework.com/t/ionic-pro-ionic-does-not-appear-to-be-a-git-repository/104089/32
I followed jaydz advice and run the command

git clone git@git.ionicjs.com:ssing1221/myProject.git
or
git push git@git.ionicjs.com:ssing1221/myProject.git

They all showed

The authenticity of host 'git.ionicjs.com (54.68.22.76)' can't be established.
Permission denied (publickey).

So I googled it again and found out that this is a ssh key problem
And I already generated my ssh key by

ssh-keygen -t rsa -C "your_email@example.com" 

So right now how can I put my key id_rsa.pub, to ionic pro for the connection?

Thanks! :pray:


#2

try to generate ssh-keygen in git bash not in cmd in your root folder


#3

Thanks for the reply.
I generated the key in git bash but where I put my key for ionic pro connection?
under .ssh folder? or under ionic project directory?
Thanks again


#4

in your project directory


#5

I tried your suggestion. Run the keygen command under my project directory by using git bash.
And then I run

git push git@git.ionicjs.com:ssing1221/myProject.git

And the result is

Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

After many attempts, I want to give up to use ionic pro now. :disappointed:

Anyway thanks for your help


#6

have you commit your repository to git first ?


#7

Yes. I already use the github before using ionic pro.
I just wonder why after the auto generation of ssh key
it shows

Request: POST https://api.ionicjs.com/users/undefined/sshkeys
Response: 404
Body:
{ link: null, type: 'NotFound', message: '404: Not Found' }

It supposes to send my key to ionic serve but it cannot.


#8

have you watched the video here https://ionicframework.com/docs/pro/basics/getting-started/


#9

according to your response ,i think you forgot to link your project with your git repo.
what is your

git status

responce ?


#10

I had followed the video. But failed after keygen


#11

I already linked to my git repo

>git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean

Thanks all the suggestion you guys even I said give up :bowing_man:


#12

ok, what external GIT service are your using?

I’m using gitlab.com

it’s really important to get the keys setup for your git provider and ionic pro.

these are my noted i keep in SImpleNote.app (free great notes app :wink:

--First Time----
$sudo npm install -g ionic@latest

$ ionic link



Automatically setup new a SSH key pair for ionic
create a new app

$ git push ionic master  (ionic-pro)
    - git commit to ionic servers
    - builds

--When pushing builds

$ git status (gitlab.com)
$ git add -p (gitlab.com)
    y to confirm
$ git commit -m 'change desc' (gitlab.com)
$ git push (gitlab.com)



#13

I use github
I thought ionic link will help me to setup a ssh key but it seems not.


#14

when i do git push ionc master i get

fatal: Invalid Ionic app repository. user_name/project_name.git
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


#15

ok, just want to make sure that you realize ionic pro is not a GIT repository.
when you do the setup you are giving access to Ionic pro to access your repository.

i use gitlab but should be same as all

before you do

$ ionic link

you need to make sure your key is setup between you and your GIT provider
yous should be able do these command

$ git status (gitlab.com)
$ git add -p (gitlab.com)
    y to confirm
$ git commit -m 'change desc' (gitlab.com)
$ git push (gitlab.com)

now you can do

$ ionic link

then when linked...

$git push ionic master (ionic-pro)

hope this helps clarify


#16

i use github and i’ve been pushing in it for more than a month. i did ionic link and it was successful. but when i do git push ionic master i get that error. same prob on mac and win


#17

what happens when you run

$ ionic link (must be in your app folder)


#18

when i ran ionic link

  1. it created ssh keys and saved them on ionic pro. i see them on my acc tab
  2. then it asked me which app to use, i chose new app and it created and changed the app id on my project
  3. then when i do git push ionic master ERROR

i did
$ git remote -v

ionic git@git.ionicjs.com:username/appname.git (fetch)
ionic git@git.ionicjs.com:username/appname.git (push)
origin https://github.com/username/appname.git (fetch)
origin https://github.com/username/appname.git (push)


#19

wow, i follow the second video at https://ionicframework.com/docs/pro/basics/getting-started/ to a T and had no issues. (i sighed of for Gitlab because he used it)

have you run?

$ ionic doctor check

and cleared any issues


#20

ran $ ionic doctor check

issues renegading angular update and ios 11 viewport.
still same pob