Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot install theme from github private repo #5

Closed
ttskch opened this issue Feb 2, 2020 · 5 comments
Closed

cannot install theme from github private repo #5

ttskch opened this issue Feb 2, 2020 · 5 comments

Comments

@ttskch
Copy link

ttskch commented Feb 2, 2020

Thanks for your awesome service!

I'm trying to install my own theme from github private repo but following error is occurring and I cannot complete installation.

There has been a critical error on your website. Please check your site admin email inbox for instructions.

I'm filling GitHub token (option) field with my personal access token of github and it checked ALL scopes just in case.

FYI, if I just make the github repo PUBLIC, I can install it correctly.

Do you have some advices?

Thanks.

In Japanese below.

素晴らしいサービスのご提供ありがとうございます。

管理画面の 外観 > Add New from GitHub で自作のテーマをgithubのプライベートリポジトリからインストールしようとすると、

サイトに重大なエラーがありました。 詳細については、サイト管理者のメール受信ボックスを確認してください。

というエラーになります。

GitHub token (option) 蘭にはgithubで発行したpersonal access tokenを入力しており、そのtokenには念のためすべてのスコープを付与してあります。

また、テーマのリポジトリをpublicにするだけでインストールは正常に成功するようになります。

どういった原因が考えられますでしょうか?

@wokamoto
Copy link
Collaborator

wokamoto commented Feb 2, 2020

このプラグインは、Git リポジトリを clone したり Git リポジトリから pull したりするのではなく、GitHub のリリース機能に添付されたパッケージをダウンロードしてきて WordPress にプラグイン/テーマをインストール/更新する機能を提供しています。
(そのため GitHub 以外の git リポジトリを元にすることはできません)

READMEにも記載していますが、Tag付けをしてリリースパッケージを添付する必要があります。
手動でリリースパッケージを作成するには以下の手順で実施していただけば良いです。

A. Manually release the new version.

  1. Please visit "releases" in your GitHub repository.
  2. Choose a tag.
  3. Fill out the release note and title.
  4. Upload your plugin which is comporessed with zip. (Optional)
  5. Press "Publish release".

また、README には GitHub Actionsを使用してタグづけされたら自動的にリリースパッケージを作成する手順も記載してありますので、そちらも参照してください。

こちらの操作を行なっていない GitHub のリポジトリを元にインストール/更新することができません。
ただし Public リポジトリの場合、パッケージを作成しなくても zip をダウンロードすることができる URL が提供されているので、そちらからダウンロードしてきてインストールを実施することができますが、バージョン管理ができないので、タグ付けとリリースパッケージ作成を行なってください。

@ttskch
Copy link
Author

ttskch commented Feb 2, 2020

@wokamoto 早速のご返信ありがとうございます!

ご説明いただいた内容、理解できました。

が、手順通りに実施してもやはり同様のエラーになってしまいました。

やったこと

  1. githubのprivateリポジトリ( https://github.com// )にテーマのソースコード一式をpush
  2. git tag 1.0.0
  3. git push origin 1.0.0
  4. https://github.com///tags にアクセス
  5. 1.0.0 の右端の ... ボタンから Create release をクリック
  6. Publish release をクリック
  7. https://github.com/settings/tokens で全部のスコープにチェックを入れたアクセストークンを生成
  8. wordpress管理画面の GitHub repo URLhttps://github.com/<user>/<repo> を入力
  9. 同じく GitHub token (option) にアクセストークンを入力
  10. 今すぐインストール をクリック
  11. サイトに重大なエラーがありました。 詳細については、サイト管理者のメール受信ボックスを確認してください。 となる

https://github.com/ttskch/shifter-theme-test
こちらのprivateリポジトリに適当なテンプレートを入れて同様の手順を試してみても再現しましたので、 @wokamoto 様をcollaboratorに招待してみました。必要でしたら確認してみていただければと思います。

@wokamoto
Copy link
Collaborator

wokamoto commented Feb 3, 2020

確認しました。以下の手順が行われていません。

4.Upload your plugin which is comporessed with zip. (Optional)

手動で zip ファイルを添付する場合は、https://github.com/ttskch/shifter-theme-test/releases/edit/1.0.0 からテーマファイル一式を zip で固めたファイルを添付してください。
私の方で実施してみましたので、これを元に Shifter にインストールしてみてください。

@wokamoto
Copy link
Collaborator

wokamoto commented Feb 3, 2020

また、上のコメントでも説明しておりますが、このリリースパッケージに添付する zip ファイルは GitHub Actions などを使えばタグづけされた時に自動で作成して添付することが可能です。
設定方法に関しては README をご確認ください。

@sawanoboly sawanoboly pinned this issue Feb 3, 2020
@ttskch
Copy link
Author

ttskch commented Feb 4, 2020

@wokamoto わざわざご確認いただきありがとうございました!手順理解できました 🙏こちらでもインストールを確認できました。引き続きよろしくお願いします!

@ttskch ttskch closed this as completed Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants