ionic-team / ionic-team/ionic-cli

Ionic doctor check trying to fix GIT repo origin that is actually working

オープン
#2,829 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
TypeScript
スター
2k
フォーク
682
PR マージ指標
30日以内にマージされた PR はありません

説明

**Description:**
`$ ionic doctor check` is telling me my GIT config is wrong, but it's not true:
```bash
$ ionic doctor check
✔ Detecting issues: 16 / 16 complete - done!
Detected 2 issues.
[WARN] App linked to 57d1... with invalid git configuration.

This app is linked to an app on Ionic (57d1...), but the git configuration is not valid. To fix, the following
step(s) need to be taken:

1) Run: ionic git remote
```
This is because I'm using SSH key aliases for my hosts. I work with projects from different companies and Bitbucket doesn't allow the same SSH key for different accounts. This is my `~/.ssh/config`:
```
Host company1
HostName bitbucket.org
IdentityFile ~/.ssh/company1
Host company2
HostName bitbucket.org
IdentityFile ~/.ssh/company2
Host company1.ionic
HostName git.ionicjs.com
IdentityFile ~/.ssh/company1
Port 22
Host company2.ionic
HostName git.ionicjs.com
IdentityFile ~/.ssh/company2
Port 22
```
And this is my project's `.git/config`:
```
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = git@company1:company1/bla.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "ionic"]
url = git@company1.ionic:myname/bla.git
fetch = +refs/heads/*:refs/remotes/ionic/*
```
Of course I could use my personal SSH key for both projects in Ionic's repo (like ~/.ssh/id_rsa.pub or just create a new one), but I want my work projects worlds to be sepparated among them and from my personal projects (yet in other account).

I bet other Bitbucket users are going through the same, since this is the recommended method from them.
Origin of the issue: https://bitbucket.org/site/master/issues/5154/someone-has-already-registered-that-ssh
Bitbucket's proposed solution (I can't find it now but it was also in Confluence's official docs): https://developer.atlassian.com/blog/2016/04/different-ssh-keys-multiple-bitbucket-accounts/

**My `ionic info`:**
```
$ ionic info

cli packages: (/home/shamank/.nvm/versions/node/v8.2.1/lib/node_modules)

@ionic/cli-utils : 1.15.0
ionic (Ionic CLI) : 3.15.0

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 3.0.1
Cordova Platforms : android 6.2.3 browser 5.0.1 ios 4.4.0
Ionic Framework : ionic-angular 3.7.1

System:

Android SDK Tools : 26.1.1
Node : v8.2.1
npm : 4.6.1
OS : Linux 3.19

Environment Variables:

ANDROID_HOME : /home/shamank/Android/Sdk

Misc:

backend : pro
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。