Git is not working in Currently build on heroku app

so i config pontoon repo, but git is block or bother me.

First - SSH_CONFIG in Pre-Deploy of Pontoon.

StrictHostKeyChecking=no

Host github.com
User git (removed, it's same)

and i run for heroku run -a app ./manage.py sync_projects

2020-04-10T12:55:04.583634+00:00 app[worker.1]: Git: [Errno 2] No such file or directory: '/app/media/projects/stellaris/git@github.com:readingsnail/stellaris.git': '/app/media/projects/stellaris/git@github.com:readingsnail/stellaris.git'
2020-04-10T12:55:04.583739+00:00 app[worker.1]: [2020-04-10 12:55:04,583: INFO/ForkPoolWorker-8] Git: [Errno 2] No such file or directory: '/app/media/projects/stellaris/git@github.com:readingsnail/stellaris.git': '/app/media/projects/stellaris/git@github.com:readingsnail/stellaris.git'
2020-04-10T12:55:06.999459+00:00 heroku[run.1703]: State changed from up to complete
2020-04-10T12:55:06.490050+00:00 app[worker.1]: [2020-04-10 12:55:06,489: ERROR/ForkPoolWorker-8] Task pontoon.sync.tasks.sync_project[93e039fe-6039-4dd3-bf72-f53bbb6626ac] raised unexpected: PullFromRepositoryException("Cloning into '/app/media/projects/stellaris/git@github.com:readingsnail/stellaris.git'...\nWarning: Permanently added 'github.com,140.82.118.4' (RSA) to the list of known hosts.\r\ngit@github.com: Permission denied (publickey).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n")
2020-04-10T12:55:06.490061+00:00 app[worker.1]: Traceback (most recent call last):
2020-04-10T12:55:06.490068+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.7/site-packages/celery/app/trace.py", line 385, in trace_task
2020-04-10T12:55:06.490068+00:00 app[worker.1]:     R = retval = fun(*args, **kwargs)
2020-04-10T12:55:06.490073+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.7/site-packages/newrelic/hooks/application_celery.py", line 84, in wrapper
2020-04-10T12:55:06.490074+00:00 app[worker.1]:     return wrapped(*args, **kwargs)
2020-04-10T12:55:06.490074+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.7/site-packages/celery/app/trace.py", line 648, in __protected_call__
2020-04-10T12:55:06.490074+00:00 app[worker.1]:     return self.run(*args, **kwargs)
2020-04-10T12:55:06.490075+00:00 app[worker.1]:   File "/app/pontoon/sync/core.py", line 69, in wrapped_func
2020-04-10T12:55:06.490075+00:00 app[worker.1]:     return func(self, *args, **kwargs)
2020-04-10T12:55:06.490076+00:00 app[worker.1]:   File "/app/pontoon/sync/tasks.py", line 105, in sync_project
2020-04-10T12:55:06.490076+00:00 app[worker.1]:     source_changes = sync_sources(db_project, now, force, no_pull)
2020-04-10T12:55:06.490077+00:00 app[worker.1]:   File "/app/pontoon/sync/tasks.py", line 132, in sync_sources
2020-04-10T12:55:06.490077+00:00 app[worker.1]:     source_repo_changed, _ = pull_changes(db_project)
2020-04-10T12:55:06.490077+00:00 app[worker.1]:   File "/app/pontoon/sync/core.py", line 323, in pull_changes
2020-04-10T12:55:06.490078+00:00 app[worker.1]:     repo_revisions = repo.pull(remaining_locales)
2020-04-10T12:55:06.490078+00:00 app[worker.1]:   File "/app/pontoon/base/models.py", line 1804, in pull
2020-04-10T12:55:06.490078+00:00 app[worker.1]:     update_from_vcs(self.type, self.url, self.checkout_path, self.branch)
2020-04-10T12:55:06.490079+00:00 app[worker.1]:   File "/app/pontoon/sync/vcs/repositories.py", line 276, in update_from_vcs
2020-04-10T12:55:06.490079+00:00 app[worker.1]:     obj.pull()
2020-04-10T12:55:06.490079+00:00 app[worker.1]:   File "/app/pontoon/sync/vcs/repositories.py", line 57, in pull
2020-04-10T12:55:06.490080+00:00 app[worker.1]:     raise PullFromRepositoryException(text_type(error))
2020-04-10T12:55:06.490086+00:00 app[worker.1]: pontoon.sync.vcs.repositories.PullFromRepositoryException: Cloning into '/app/media/projects/stellaris/git@github.com:readingsnail/stellaris.git'...
2020-04-10T12:55:06.490086+00:00 app[worker.1]: Warning: Permanently added 'github.com,140.82.118.4' (RSA) to the list of known hosts.
2020-04-10T12:55:06.490086+00:00 app[worker.1]: git@github.com: Permission denied (publickey).
2020-04-10T12:55:06.490087+00:00 app[worker.1]: fatal: Could not read from remote repository.
2020-04-10T12:55:06.490087+00:00 app[worker.1]: 
2020-04-10T12:55:06.490087+00:00 app[worker.1]: Please make sure you have the correct access rights
2020-04-10T12:55:06.490088+00:00 app[worker.1]: and the repository exists.

and repo config is here - change to https://www.github.com/readingsnail/stellaris.git is same

and curiously, this SSH Key is same of my Mac’s using SSH Key. so mac is working well, but pontoon is not working.

and sometimes, 2020-04-10T21:17:00.503084+00:00 app[worker.1]: Load key "/app/.ssh/id_rsa": invalid format this message occur.

so this full message is almost same

2020-04-10T21:17:00.503075+00:00 app[worker.1]: Traceback (most recent call last):
2020-04-10T21:17:00.503077+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/site-packages/celery/app/trace.py", line 385, in trace_task
2020-04-10T21:17:00.503077+00:00 app[worker.1]: R = retval = fun(*args, **kwargs)
2020-04-10T21:17:00.503077+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/site-packages/newrelic/hooks/application_celery.py", line 84, in wrapper
2020-04-10T21:17:00.503078+00:00 app[worker.1]: return wrapped(*args, **kwargs)
2020-04-10T21:17:00.503078+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/site-packages/celery/app/trace.py", line 648, in __protected_call__
2020-04-10T21:17:00.503078+00:00 app[worker.1]: return self.run(*args, **kwargs)
2020-04-10T21:17:00.503079+00:00 app[worker.1]: File "/app/pontoon/sync/core.py", line 69, in wrapped_func
2020-04-10T21:17:00.503079+00:00 app[worker.1]: return func(self, *args, **kwargs)
2020-04-10T21:17:00.503079+00:00 app[worker.1]: File "/app/pontoon/sync/tasks.py", line 105, in sync_project
2020-04-10T21:17:00.503080+00:00 app[worker.1]: source_changes = sync_sources(db_project, now, force, no_pull)
2020-04-10T21:17:00.503081+00:00 app[worker.1]: File "/app/pontoon/sync/tasks.py", line 132, in sync_sources
2020-04-10T21:17:00.503081+00:00 app[worker.1]: source_repo_changed, _ = pull_changes(db_project)
2020-04-10T21:17:00.503081+00:00 app[worker.1]: File "/app/pontoon/sync/core.py", line 323, in pull_changes
2020-04-10T21:17:00.503081+00:00 app[worker.1]: repo_revisions = repo.pull(remaining_locales)
2020-04-10T21:17:00.503082+00:00 app[worker.1]: File "/app/pontoon/base/models.py", line 1804, in pull
2020-04-10T21:17:00.503082+00:00 app[worker.1]: update_from_vcs(self.type, self.url, self.checkout_path, self.branch)
2020-04-10T21:17:00.503082+00:00 app[worker.1]: File "/app/pontoon/sync/vcs/repositories.py", line 276, in update_from_vcs
2020-04-10T21:17:00.503083+00:00 app[worker.1]: obj.pull()
2020-04-10T21:17:00.503083+00:00 app[worker.1]: File "/app/pontoon/sync/vcs/repositories.py", line 57, in pull
2020-04-10T21:17:00.503084+00:00 app[worker.1]: raise PullFromRepositoryException(text_type(error))
2020-04-10T21:17:00.503084+00:00 app[worker.1]: pontoon.sync.vcs.repositories.PullFromRepositoryException: Cloning into '/app/media/projects/stellaris/git@github.com:readingsnail/stellaris.git'...
2020-04-10T21:17:00.503084+00:00 app[worker.1]: Load key "/app/.ssh/id_rsa": invalid format
2020-04-10T21:17:00.503084+00:00 app[worker.1]: git@github.com: Permission denied (publickey).
2020-04-10T21:17:00.503085+00:00 app[worker.1]: fatal: Could not read from remote repository.
2020-04-10T21:17:00.503085+00:00 app[worker.1]:
2020-04-10T21:17:00.503085+00:00 app[worker.1]: Please make sure you have the correct access rights
2020-04-10T21:17:00.503085+00:00 app[worker.1]: and the repository exists.

download to application slugs, id_rsa file is exist and same. so that’s reason, i guess add public key(github’s registered key), but it’s still error, and heroku ps:exec is known

> $ heroku ps:exec -a --dyno=worker.1
Establishing credentials... done
Connecting to worker.1 on ⬢ translates...
~ $ ssh -T git@github.com
Enter passphrase for key '/app/.ssh/id_rsa':
Hi readingsnail! You've successfully authenticated, but GitHub does not provide shell access.

So this it… it’s working. but why not working ssh key… need more for this?

~/.ssh $ eval `ssh-agent -s`
Agent pid 160
~/.ssh $ ssh-add ~/.ssh/*_rsa
Identity added: /app/.ssh/heroku_exec_rsa (/app/.ssh/heroku_exec_rsa)
Enter passphrase for /app/.ssh/id_rsa:
Identity added: /app/.ssh/id_rsa 

this thing is yeah, not working.

also

StrictHostKeyChecking=no

HOST *.github.com
   USER readingsnail
   IdentifyFile ~/.ssh/id_rsa

is failed. so right SSH CONFIG or working Git is exist?? or please using heroku ps:exec -a app --dyno=worker.1 - Passphrase is working in heroku in SSH Tunnel

ah, is failed. any idea?

StrictHostKeyChecking=no
UserKnownHostsFile=/dev/null (well, removed or exist same)
Host github
Hostname github.com
User 
PubKeyAuthentication yes
IdentityFile .ssh/id_rsa

ah, is failed. any idea? also

Host github
  StrictHostKeyChecking=no
  UserKnownHostsFile=/dev/null
  Hostname github.com
  User
  IdentityFile /app/.ssh/id_rsa

is failed and… is same

Host github
  StrictHostKeyChecking=no
  Hostname github.com
  User git
  IdentityFile /app/.ssh/id_rsa

two thing is weird things. - Host key verification failed.

2020-04-13T14:07:25.570841+00:00 app[worker.1]: Traceback (most recent call last):
2020-04-13T14:07:25.570843+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.7/site-packages/celery/app/trace.py", line 385, in trace_task
2020-04-13T14:07:25.570843+00:00 app[worker.1]:     R = retval = fun(*args, **kwargs)
2020-04-13T14:07:25.570844+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.7/site-packages/newrelic/hooks/application_celery.py", line 84, in wrapper
2020-04-13T14:07:25.570844+00:00 app[worker.1]:     return wrapped(*args, **kwargs)
2020-04-13T14:07:25.570845+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.7/site-packages/celery/app/trace.py", line 648, in __protected_call__
2020-04-13T14:07:25.570845+00:00 app[worker.1]:     return self.run(*args, **kwargs)
2020-04-13T14:07:25.570845+00:00 app[worker.1]:   File "/app/pontoon/sync/core.py", line 69, in wrapped_func
2020-04-13T14:07:25.570846+00:00 app[worker.1]:     return func(self, *args, **kwargs)
2020-04-13T14:07:25.570846+00:00 app[worker.1]:   File "/app/pontoon/sync/tasks.py", line 105, in sync_project
2020-04-13T14:07:25.570847+00:00 app[worker.1]:     source_changes = sync_sources(db_project, now, force, no_pull)
2020-04-13T14:07:25.570847+00:00 app[worker.1]:   File "/app/pontoon/sync/tasks.py", line 132, in sync_sources
2020-04-13T14:07:25.570848+00:00 app[worker.1]:     source_repo_changed, _ = pull_changes(db_project)
2020-04-13T14:07:25.570848+00:00 app[worker.1]:   File "/app/pontoon/sync/core.py", line 323, in pull_changes
2020-04-13T14:07:25.570848+00:00 app[worker.1]:     repo_revisions = repo.pull(remaining_locales)
2020-04-13T14:07:25.570849+00:00 app[worker.1]:   File "/app/pontoon/base/models.py", line 1804, in pull
2020-04-13T14:07:25.570849+00:00 app[worker.1]:     update_from_vcs(self.type, self.url, self.checkout_path, self.branch)
2020-04-13T14:07:25.570849+00:00 app[worker.1]:   File "/app/pontoon/sync/vcs/repositories.py", line 276, in update_from_vcs
2020-04-13T14:07:25.570850+00:00 app[worker.1]:     obj.pull()
2020-04-13T14:07:25.570850+00:00 app[worker.1]:   File "/app/pontoon/sync/vcs/repositories.py", line 57, in pull
2020-04-13T14:07:25.570851+00:00 app[worker.1]:     raise PullFromRepositoryException(text_type(error))
2020-04-13T14:07:25.570852+00:00 app[worker.1]: pontoon.sync.vcs.repositories.PullFromRepositoryException: Cloning into '/app/media/projects/stellaris/git@github.com:readingsnail/stellaris.git'...
2020-04-13T14:07:25.570852+00:00 app[worker.1]: Host key verification failed.
2020-04-13T14:07:25.570852+00:00 app[worker.1]: fatal: Could not read from remote repository.
2020-04-13T14:07:25.570853+00:00 app[worker.1]: 
2020-04-13T14:07:25.570853+00:00 app[worker.1]: Please make sure you have the correct access rights
2020-04-13T14:07:25.570854+00:00 app[worker.1]: and the repository exists.

it’s same, Host key verification failed

Host pontoon
	User git
	HostName github.com
        IdentityFile ~/.ssh/pontoon
	StrictHostKeyChecking no

Host GitHub
     Stricthostkeychecking no
     userknownhostsfile=/dev/null
     Hostname github.com
     User git
     Pubkeyauthentication yes
     Identifyfile ./ssh/id_rsa

Host *
  StrictHostKeyChecking=no
  User *

upper is… well, yeah it’s same - Host key verification failed

so other possible way is exist? i found this link, https://help.heroku.com/SP5I8HXO/host-key-verification-error-when-accessing-private-github-repository , how to using this? - well, it’s public, but almost SSH settings is blocked

and… in heroku ps:exec -a app --dyno:worker.1

~/.ssh $ ssh-copy-id -i ~/.ssh/id_rsa.pub github.com
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/app/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
Enter passphrase for key '/app/.ssh/id_rsa':
Enter passphrase for key '/app/.ssh/id_rsa':
Enter passphrase for key '/app/.ssh/id_rsa':
/usr/bin/ssh-copy-id: INFO: 3 key(s) remain to be installed -- if you are prompted now it is to install the new keys
key_load_public: invalid format
Enter passphrase for key '/app/.ssh/id_rsa':
u6902@github.com: Permission denied (publickey).

~/.ssh $ whoami
u6902

so, still u6902@github.com is replaced git@github.com?

this ssh_config is here -

Host github
	User git
	HostName github.com
	IdentityFile ~/.ssh/id_rsa
	StrictHostKeyChecking no
2020-04-14T23:47:46.159183+00:00 app[worker.1]: Git: [Errno 2] No such file or directory: '/app/media/projects/stellaris/git@github.com:readingsnail/stellaris.git': '/app/media/projects/stellaris/git@github.com:readingsnail/stellaris.git'
2020-04-14T23:47:46.159343+00:00 app[worker.1]: [2020-04-14 23:47:46,158: INFO/ForkPoolWorker-8] Git: [Errno 2] No such file or directory: '/app/media/projects/stellaris/git@github.com:readingsnail/stellaris.git': '/app/media/projects/stellaris/git@github.com:readingsnail/stellaris.git'
2020-04-14T23:47:47.865811+00:00 app[worker.1]: [2020-04-14 23:47:47,865: ERROR/ForkPoolWorker-8] Task pontoon.sync.tasks.sync_project[2d94bcdd-90ef-474a-a0ae-96552730ed37] raised unexpected: PullFromRepositoryException("Cloning into '/app/media/projects/stellaris/git@github.com:readingsnail/stellaris.git'...\nWarning: Permanently added 'github.com,140.82.118.3' (RSA) to the list of known hosts.\r\ngit@github.com: Permission denied (publickey).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n")
2020-04-14T23:47:47.865821+00:00 app[worker.1]: Traceback (most recent call last):
2020-04-14T23:47:47.865822+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.7/site-packages/celery/app/trace.py", line 385, in trace_task
2020-04-14T23:47:47.865824+00:00 app[worker.1]:     R = retval = fun(*args, **kwargs)
2020-04-14T23:47:47.865825+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.7/site-packages/newrelic/hooks/application_celery.py", line 84, in wrapper
2020-04-14T23:47:47.865825+00:00 app[worker.1]:     return wrapped(*args, **kwargs)
2020-04-14T23:47:47.865826+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.7/site-packages/celery/app/trace.py", line 648, in __protected_call__
2020-04-14T23:47:47.865826+00:00 app[worker.1]:     return self.run(*args, **kwargs)
2020-04-14T23:47:47.865827+00:00 app[worker.1]:   File "/app/pontoon/sync/core.py", line 69, in wrapped_func
2020-04-14T23:47:47.865827+00:00 app[worker.1]:     return func(self, *args, **kwargs)
2020-04-14T23:47:47.865828+00:00 app[worker.1]:   File "/app/pontoon/sync/tasks.py", line 105, in sync_project
2020-04-14T23:47:47.865829+00:00 app[worker.1]:     source_changes = sync_sources(db_project, now, force, no_pull)
2020-04-14T23:47:47.865829+00:00 app[worker.1]:   File "/app/pontoon/sync/tasks.py", line 132, in sync_sources
2020-04-14T23:47:47.865830+00:00 app[worker.1]:     source_repo_changed, _ = pull_changes(db_project)
2020-04-14T23:47:47.865830+00:00 app[worker.1]:   File "/app/pontoon/sync/core.py", line 323, in pull_changes
2020-04-14T23:47:47.865831+00:00 app[worker.1]:     repo_revisions = repo.pull(remaining_locales)
2020-04-14T23:47:47.865831+00:00 app[worker.1]:   File "/app/pontoon/base/models.py", line 1804, in pull
2020-04-14T23:47:47.865832+00:00 app[worker.1]:     update_from_vcs(self.type, self.url, self.checkout_path, self.branch)
2020-04-14T23:47:47.865832+00:00 app[worker.1]:   File "/app/pontoon/sync/vcs/repositories.py", line 276, in update_from_vcs
2020-04-14T23:47:47.865833+00:00 app[worker.1]:     obj.pull()
2020-04-14T23:47:47.865833+00:00 app[worker.1]:   File "/app/pontoon/sync/vcs/repositories.py", line 57, in pull
2020-04-14T23:47:47.865834+00:00 app[worker.1]:     raise PullFromRepositoryException(text_type(error))
2020-04-14T23:47:47.865834+00:00 app[worker.1]: pontoon.sync.vcs.repositories.PullFromRepositoryException: Cloning into '/app/media/projects/stellaris/git@github.com:readingsnail/stellaris.git'...
2020-04-14T23:47:47.865835+00:00 app[worker.1]: Warning: Permanently added 'github.com,140.82.118.3' (RSA) to the list of known hosts.
2020-04-14T23:47:47.865835+00:00 app[worker.1]: git@github.com: Permission denied (publickey).
2020-04-14T23:47:47.865836+00:00 app[worker.1]: fatal: Could not read from remote repository.
2020-04-14T23:47:47.865836+00:00 app[worker.1]: 
2020-04-14T23:47:47.865837+00:00 app[worker.1]: Please make sure you have the correct access rights
2020-04-14T23:47:47.865838+00:00 app[worker.1]: and the repository exists.

so almost error log. maybe 2020-04-14T23:47:46.159183+00:00 app[worker.1]: Git: [Errno 2] No such file or directory: '/app/media/projects/stellaris/git@github.com:readingsnail/stellaris.git': '/app/media/projects/stellaris/git@github.com:readingsnail/stellaris.git' is triggered for not synced

1 Like

I’m having the same problem when trying to configure git with Pontoon.
SSH config is like so

StrictHostKeyChecking=no

Host <self-hosted gitlab server>
User git

and added a private key to the pontoon instance. The public key is enabled under my username on our gitlab machine. When running heroku run ./manage.py sync_projects , the project we have created is successfully queued for sync. But the logs at /sync/log never report success or faillure, they just stay on In Progress.

I opened a shell with heroku run ./manage.py shell and then the following:

from pontoon.base.models import Project
from pontoon.sync.tasks import sync_project
from pontoon.sync.models import SyncLog
from django.utils import timezone

project = Project.objects.syncable()[1]
sync_log = SyncLog.objects.create(start_time=timezone.now())
sync_project(project.pk, sync_log.pk, locale=None, no_pull=False, no_commit=True, force=True)

and get the following output:

Syncing project <projectname>.
Git: [Errno 2] No such file or directory: '/app/media/projects/<projectname>/git@<url>': '/app/media/projects/<projectname>/git@<url>'
git@<url>'s password:

Note that there is a prompt for a password after the file not found error. I’m not sure if that’s because of the earlier error or not … but wouldn’t expect a password prompt if using SSH?

Did you try following Heroku’s instructions to use an SSH key?

Thanks for Reply, but i connecting problem of github, not heroku. github’s OAuth / Heroku’s SSH is fine.

1 Like

Sorry, I skimmed through the article (clearly too quickly) and thought I saw a testing connection to GitHub :-\

Not sure I can help, because I don’t know how Mozilla’s instance is actually set up. I assume you both already followed the instructions here (heroku-buildpack-ssh in particular)?
https://mozilla-pontoon.readthedocs.io/en/latest/admin/deployment.html

1 Like

thanks for reply, i always using https://github.com/mozilla/pontoon/ 's button. so i’m not touch other build pack etc. and my ssh config(still) is

Host github.com
	User git
	HostName github.com
	IdentityFile ~/.ssh/id_rsa
	StrictHostKeyChecking no

and only touch heroku’s var keys.


(still and until now build packs)

Thanks for Reply, yeah SSH is not asked.

and in my case from part is not error, but project part is error (sorry, i’m a script kid :wink:, so debug is not my concern)

>>> project = Project.objects.syncable()[1]
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/app/.heroku/python/lib/python3.7/site-packages/django/db/models/query.py", line 309, in getitem
    return qs._result_cache[0]
IndexError: list index out of range
>>> sync_log = SyncLog.objects.create(start_time=timezone.now())
>>> sync_project(project.pk, sync_log.pk, locale=None, no_pull=False, no_commit=True, force=True)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
NameError: name 'project' is not defined

Thanks for your reply @flod – yep, those instructions you linked are the ones I used. Went through them all. Some seemed unnecessary though, ie, the addons were already attached with the right names, and the database migration script reported nothing needed to be done.

I just re-ran the buildpack commands. It looks like I was missing the SSH one, my bad. But still getting the same error. Do I need to rebuild the app?

I’m a newbie with Heroku, so I’m not sure how to trigger a rebuild. The pontoon deployment guide says to use the Heroku Repo plugin, which I’ve installed but it doesn’t have a rebuild command:

set the bare repo for immediate consumption

USAGE
  $ heroku repo:COMMAND

COMMANDS
  repo:clone        set the bare repo for immediate consumption
  repo:download     download the repo
  repo:gc           run a git gc --aggressive on an application's repository
  repo:purge_cache  delete the contents of the build cache in the repository
  repo:reset        reset the repo

using for this - https://www.darraghoriordan.com/2019/03/02/heroku-push-failed-force-rebuild/

Thanks @readingsnail, that’s helpful. Sadly I’m still getting the same error after running releases:retry. I will deploy a fresh app and see if it works when I add the SSH helper in the right order.

Looks like you only have one project defined in Pontoon.

You could try changing

project = Project.objects.syncable()[1]

to

project = Project.objects.syncable()[0]
1 Like

thanks, it’s same. in my assist program(SSH Config generator), StrictHostKeyChecking no is printed, it’s not question of password.

and my result is here.

Running ./manage.py shell on ⬢ translates... up, run.6494 (Free)
Python 3.7.6 (default, Dec 23 2019, 04:25:22)
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from pontoon.base.models import Project
>>> from pontoon.sync.tasks import sync_project
>>> from pontoon.sync.models import SyncLog
>>> from django.utils import timezone
>>> project = Project.objects.syncable()[0]
>>> sync_log = SyncLog.objects.create(start_time=timezone.now())
>>> sync_project(project.pk, sync_log.pk, locale=None, no_pull=False, no_commit=True, force=True)
Syncing project stellaris.
Git: [Errno 2] No such file or directory: '/app/media/projects/stellaris/git@github.com:readingsnail/stellaris.git': '/app/media/projects/stellaris/git@github.com:readingsnail/stellaris.git'

i setting to 1 project, because testing for pontoon (several project is waiting) and my try thing is fresh app is not helpful for this(i tried for 30+). hmm…

i filed bugzilla - https://bugzilla.mozilla.org/show_bug.cgi?id=1631084 - but i’m confused. lust translation sites is using git, and still working. maybe my setting is wrong. but i don’t find it…

well, my mistaked. sorry

  • Git: [Errno 2] No such file or directory: '/app/media/projects/A/git@github.com:B/C.git': '/app/media/projects/A/git@github.com:B/C.git' > check .gitignore. /media/ is included.
  • SSH Problem - used Batch Mode yes in your ssh config

yeah, so week ago, i testing pontoon, transfered zanata. for now, well working. and thanks for reply :slight_smile: