Marek Tesař
Marek Tesař

Reputation: 117

GIT says "No such file or directory" but the file exists

Im facing this problem during GIT push:

git push production master

Enumerating objects: 11, done. Counting objects: 100% (11/11), done. Delta compression using up to 8 threads Compressing objects: 100% (6/6), done. Writing objects: 100% (6/6), 462 bytes | 462.00 KiB/s, done. Total 6 (delta 5), reused 0 (delta 0), pack-reused 0 remote: fatal: this operation must be run in a work tree To ssh://xx.xx.xx.xx/var/repo/site.git    dea7aae..ad83be3  master -> master

The directory and the file exists so I dont really understand whats goin on, thank your for helpin me out.

Upvotes: 1

Views: 1794

Answers (1)

VonC
VonC

Reputation: 1328842

If the file does exist on the remote side, is executable (chmod 755), then, as seen here, double-check the EOL.

It might have CRLF instead of LF: that would be enough to not make it executable.

Upvotes: 2

Related Questions