実現したいこと
private submoduleを含むプロジェクトを、以下のようにsubmoduleのURLにユーザー名とパスワードを埋め込む以外の方法でHerokuへpushできるようにしたいです。(submoduleがorganization内にあるので、埋め込んだパスワードが他の人にバレてしまうためです)
[submodule "assets/gd-assets"] path = assets/gd-assets url = username:password@github.com:xxxx.git
発生している問題・エラーメッセージ
(リポジトリのURLは一部変更しています)
Repository not foundのエラーが出ます。submoduleのURLが正しいことは確認しました。
Total 0 (delta 0), reused 0 (delta 0) remote: Git submodules detected, installing: remote: Submodule 'assets/gd-assets' (git@github.com:xxxx.git) registered for path 'assets/gd-assets' remote: Cloning into 'assets/gd-assets'... remote: ERROR: Repository not found. remote: fatal: Could not read from remote repository. remote: remote: Please make sure you have the correct access rights remote: and the repository exists. remote: fatal: clone of 'git@github.com:xxxx.git' into submodule path 'assets/gd-assets' failed remote: remote: ! Push rejected, submodule install failed remote: To https://git.heroku.com/xxxx.git ! [remote rejected] main -> main (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/xxxx.git'
試したこと
"heroku-buildpack-ssh-key"というbuildpackを追加して、環境設定に秘密鍵を追加してからpushしてみましたが同様のエラーが出ました。(この秘密鍵でgitにssh接続できることは確認しました)
https://github.com/heroku/heroku-buildpack-ssh-key
"heroku-buildpack-git-submodule"という同様のbuildpackも試してみましたが同じ結果でした。
https://github.com/SectorLabs/heroku-buildpack-git-submodule
回答よろしくお願いいたします。
あなたの回答
tips
プレビュー