Open edgariscoding opened 6 years ago
Getting the same 400 bad request error for Bitbucket private repository using ssh.
I encounter the same problem, I read Git-Auto-Deploy source code and I realize that if we declare only url in repositories config, that is not enough. When gitautodeploy check, sometimes (i don't know the reason) the actual request URL what it got is the last path of URL (with your example: 'git@github.com:edgar-team/edgar-app.git' then it get 'edgar-app' ), then I see we have another config is match-url, if this config is declared, the script will check it first, you only need declare config "match-url":"edgar-app" below url config, it will work. like this: // Project configs
"repositories": [ { "url": "git@github.com:edgar-team/edgar-app.git", "match-url": "edgar-app", "branch": "master", "remote": "origin", "path": "/var/www/edgar-app.com/public_html/", "deploy": "echo deploying" } ]
I'm using GitHub and Ubuntu 14 on a DigitalOcean Droplet.
The error message is pretty self explanatory, so I went ahead and tried every single one of the variations it suggested for my repo address (both HTTPS and SSH).
https://github.com/edgar-team/edgar-app
https://github.com/edgar-team/edgar-app.git
git://github.com/edgar-team/edgar-app.git
git@github.com:edgar-team/edgar-app.git
They all resulted in the same error.
I've made sure to restart the service, even restarted the entire server. Any advice?
(Note I replaced the real team name and repo name with dummy text)
When I test the webhook from within GitHub's settings page, I get the following error:
Response: 404
Headers
Body
When I check
Git-Auto-Deploy
on my server I can see the following output:Git-Auto-Deploy output
Git remote origin
The request body
Looking at the request body on GitHub's Webhooks settings page shows the following URLs:
Config file
Located at `/etc/git-auto-deploy.conf.json