Skip to content
Advertisement

Fabric 2 automating deployment error when git pulling on remote server. Repository not found

I’m trying to automate my deployment with Fabric 2.

When I manually do a git pull through the command line on the remote server everything works fine.

When I try to do the same with my Fabric/Invoke script it does not allow me to pull.

It does though allow me to do git status and other commands.

The code:

JavaScript

The results are:

JavaScript

Notes:

I don’t even get asked for a passphrase while doing the pull.

I have tried doing the pull without activating the environment but that didn’t work either.


What could possibly be the problem?

Advertisement

Answer

Please place con.run("git pull origin {}".format(branch)) outside the with con.prefix("source ENV/bin/activate"):.

Your code has nothing to do with the interpreter or the virtual env! Try that and it should works!

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement