Comments (6)
I must say, I am quiet surprised that this didn't work. Do you have git installed on the remote host?
While deliver is completely configurable, the default strategies rely on git.
Could you paste the entire deliver log? Deliver logs everything to /tmp/deliver-[app-name]
; ).
echo -n > /tmp/deliver-[app-name] # clear the file
deliver --verbose # re-deliver the app
cat /tmp/deliver-[app-name] | pbcopy # let's see the log then!
from deliver.
The log as requested:
Mon 9 Jul 2012 13:50:19 CEST ::: �[1m�[32mDELIVERING [app-name] WITH NODEJS STRATEGY�[0;10m
Mon 9 Jul 2012 13:50:19 CEST ::: �[33m----->�[0;10m �[1m�[37mEnsuring remote is ready to accept git pushes�[0;10m
Mon 9 Jul 2012 13:50:19 CEST ::: [app-name]@nodejs01-[app-name] :
set -e
if [ ! -d ~[app-name]/app ]
then
mkdir ~[app-name]/app
cd ~[app-name]/app
git init
git config receive.denyCurrentBranch ignore
fi
Mon 9 Jul 2012 13:50:20 CEST ::: �[33m----->�[0;10m �[1m�[37mPushing new commits with git to: [app-name]@nodejs01-[app-name]�[0;10m
Mon 9 Jul 2012 13:50:20 CEST ::: JOB: git push -f [app-name]@nodejs01-[app-name] node
And this was the terminal output:
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 375 bytes, done.
Total 4 (delta 1), reused 0 (delta 0)
remote: error: refusing to update checked out branch: refs/heads/node
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to match
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
remote: error: its current branch; however, this is not recommended unless you
remote: error: arranged to update its work tree to match what you pushed in some
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, set
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To [app-name]@nodejs01-[app-name]:~[app-name]/app
! [remote rejected] node -> node (branch is currently checked out)
error: failed to push some refs to '[app-name]@nodejs01-[app-name]:~[app-name]/app'
FAILED 1:
git push -f [app-name]@nodejs01-[app-name] node
I was looking at your code and it seems that the adjusting of the setting in git to recieve is not happening. If I ssh into the server and do a git pull before running the command everything happens just fine. It's only when I have changes to run that things go wrong.
For my part, don't worry about this too much, I have the code running on what will be the production server and I really need to get back to site/app code. I want to revisit deployment later this month.
from deliver.
There's something different about your setup. I have a feeling the git config receive.denyCurrentBranch ignore
command doesn't get to run (and potentially the git init
before). Maybe a permissions issue?
This will sound a bit hack-ish, but try changing the set -e
to set -x
in the deliver/libexec/common file, init_app_remotely()
function. Now run deliver in verbose mode (-V
or --verbose
flag). This ought to flush out the specific failure.
Just pushed a nodejs app for the first time, to a local VM. That's using a slightly customised nodejs strategy, but nothing special.
from deliver.
Well, today is live day, and I am working from a different development station but with all the same code and things seem to be working. I am going to close the issue.
from deliver.
Glad to hear things are working!
Would be interesting to find out what exactly was going wrong (for future reference). It's not important though, happy to leave it at this. Cheers!
from deliver.
This happened for me as well, had to do a git push on that branch on the remote server and then try deliver again and it worked.
from deliver.
Related Issues (20)
- Static assets pushed to separate hosts HOT 1
- Rename SERVERS to HOSTS HOT 1
- PORT variable doesn't work HOT 6
- Host keys are breaking in git_submodules()
- Authorize remote hosts explicitly
- Authorizing multiple hosts on initial deliver freezes HOT 1
- SIGINT during git push does not stop gracefully HOT 1
- Option to sync / check git remote parity before deliver HOT 1
- Generated strategy tries to push wrong revision HOT 1
- Illumos / smf support HOT 1
- Deliver requires /usr/bin/sh to be bash HOT 1
- Foreman, exports and init control HOT 1
- foreman export upstart tmp HOT 2
- bug in launch HOT 1
- tag v0.8.0 HOT 2
- Timeout during npm install HOT 4
- Does deliver support rollback? HOT 1
- Staging / Testing HOT 1
- Request: make it installable through npm HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deliver.