When deploying to Heroku, I get the following error:
remote: Git submodules detected, installing:
remote: Submodule 'surveyScriptContents' (git@github.com:PurplePineapple123/Post-Purchase-Survey-Script-Tag.git) registered for path 'surveyScriptContents'
remote: Cloning into 'surveyScriptContents'...
remote: Warning: Permanently added the ECDSA host key for IP address '140.82.112.3' to the list of known hosts.
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:PurplePineapple123/Post-Purchase-Survey-Script-Tag.git' into submodule path 'surveyScriptContents' failed
remote:
remote: ! Push rejected, submodule install failed
remote:
To https://git.heroku.com/morning-peak-19860.git
! [remote rejected] HEAD -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/morning-peak-19860.git'
This issue is occurring because I had to change my workflow due to issues with Heroku's GitHub integration. My normal workflow would be: push changes from local branch to GitHub, create pull request and merge, this then auto pushes changes from GitHub to Heroku.
However, I now have to use the Heroku CLI and have been running into issues with submodules when trying to push to git push heroku HEAD:master
or git push heroku HEAD
from my local machine.
After reading the docs Heroku has on submodules, I'm still confused on exactly what the issue is.
I'm not sure why specifically submodules have issues when using the Heroku CLI but work fine when using the GitHub integration.
Any insights on how to get this working?
Edit:
So I followed this guideand changed from SSH to HTTPS for the submodule in .git/config. This resulted in a different error (auth?) which is a step in the right direction.
remote: Git submodules detected, installing:
remote: Submodule 'surveyScriptContents' (https://github.com/PurplePineapple123/Post-Purchase-Survey-Script-Tag.git) registered for path 'surveyScriptContents'
remote: Cloning into 'surveyScriptContents'...
remote: fatal: could not read Username for 'https://github.com': No such device or address
remote: fatal: clone of 'https://github.com/PurplePineapple123/Post-Purchase-Survey-Script-Tag.git' into submodule path 'surveyScriptContents' failed
remote:
remote: ! Push rejected, submodule install failed
remote:
To https://git.heroku.com/morning-peak-19860.git
! [remote rejected] HEAD -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/morning-peak-19860.git'