GIT Error Setting Up FreePBX (SNG7) Development Environment

I am a bit of a git newbie, trying to setup a dev environment on SNG7 distro, followed instructions Setting up a Development environment from the FreePBX Distro.

Previous steps all look like they worked as expected, but when I run the step

./freepbx_git.php --setup --switch=release/14.0 --keys=freepbx

or

./freepbx_git.php --setup --mode=ssh --switch=release/14.0 --keys=freepbx

and enter the UN/PW that gets me into freepbx.org, I get

FreePBX Username: myusername
FreePBX Password: *************
Cloning amd into /usr/src/freepbx/amd...PHP Fatal error:  Uncaught exception 'Exception' with message 'Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
' in /usr/src/devtools/libraries/Git.php:262
Stack trace:
#0 /usr/src/devtools/libraries/Git.php(277): GitRepo->run_command('/usr/bin/git cl...')
#1 /usr/src/devtools/libraries/Git.php(358): GitRepo->run('clone --local s...')
#2 /usr/src/devtools/libraries/Git.php(137): GitRepo->clone_from('ssh://[email protected]...')
#3 /usr/src/devtools/libraries/Git.php(63): GitRepo::create_new('/usr/src/freepb...', 'ssh://[email protected]...')
#4 /usr/src/devtools/libraries/freepbx.php(237): Git::create('/usr/src/freepb...', 'ssh://[email protected]...')
#5 /usr/src/devtools/freepbx_git.php(284): freepbx->setupDevRepos('/usr/src/freepb...', false, 'ssh', 'release/14.0', 'freepbx')
#6 {main}
  thrown in /usr/src/devtools/libraries/Git.php on line 262
[root@SNG7-Dev devtools]#

Did I miss a step someplace? Am I supposed to create my own repo first? The UN/PW works to log me into freepbx.org and Bitbucket at Log in - FreePBX GIT.

What did you find to solve this as I am having the exact same issue? Only I am trying to sync version 15 instead of 14. Thanks!

I never got this to work. If you figure it out, let me know!

You have to setup a ssh keygen as outlined in bitbucket, even if you try to use the http method, it still requires you to add a ssh-keygen to get it to sync. Basically run ssh-keygen and copy the text in /root/.ssh/id_rsa.pub to bitbucket’s approved ssh keys in your bitbucket account (that account would be synced with you freepbx account)

2 Likes