getnikola / nikola-themes

Themes for Nikola
https://themes.getnikola.com/
71 stars 51 forks source link

"fatal: Not a git repository" on github_deploy attempt with the "lotabout" theme #76

Closed kishorbhat closed 8 years ago

kishorbhat commented 8 years ago

More specifically,

$ git init .
Initialized empty Git repository in /home/kishor/blog/nikola/blog/.git/
fatal: Not a git repository: themes/lotabout/../../.git/modules/v7/lotabout

Now, the output of any git command in this directory gives that fatal: Not a git repository: themes/lotabout/../../.git/modules/v7/lotabout error.

$ nikola github_deploy
Scanning posts........done!
.  sitemap:output/sitemap.xml
.  sitemap:output/sitemapindex.xml
Scanning posts........done!
[2016-04-06T04:34:29Z] INFO: github_deploy: ==> ['git', 'checkout', u'src']
error: pathspec 'src' did not match any file(s) known to git.
[2016-04-06T04:34:29Z] INFO: github_deploy: ==> ['git', 'checkout', '-b', u'src']
Switched to a new branch 'src'
[2016-04-06T04:34:29Z] INFO: github_deploy: ==> ['git', 'add', '.']
fatal: Not a git repository: themes/lotabout/../../.git/modules/v7/lotabout
[2016-04-06T04:34:29Z] ERROR: github_deploy: Failed GitHub deployment — command ['git', 'add', '.'] returned 128
fatal: Not a git repository: themes/lotabout/../../.git/modules/v7/lotabout

The themes/lotabout/../../.git/modules/v7/lotabout folder doesn't even exist. What's happening here?

hhirsch commented 8 years ago

@therealkbhat Are there any .gitmodules files?

kishorbhat commented 8 years ago

@hhirsch nope.

hhirsch commented 8 years ago

@therealkbhat Can you upload these files somewhere so I can try to reproduce the problem?

kishorbhat commented 8 years ago

@hhirsch Seeing as how git wasn't working there, I put it up on Google Drive. You can get the blog files here.

hhirsch commented 8 years ago

For me it worked without error:

 ~/Downloads/blog (master●)
$ git init
Reinitialisierte existierendes Git-Repository in /home/henry/Downloads/blog/.git/

~/Downloads/blog (master●)
$ git status
Auf Branch master

Initialer Commit

Unversionierte Dateien:
  (benutzen Sie "git add <Datei>...", um die Änderungen zum Commit vorzumerken)

        .gitignore
        conf.py
        files/
        images/
        posts/
        themes/

nichts zum Commit vorgemerkt, aber es gibt unversionierte Dateien (benutzen Sie "git add" zum Versionieren)

 ~/Downloads/blog (master●)
$ 
Kwpolska commented 8 years ago

There is a .git file there that is not handled correctly. I’ll fix that now.

(this was also in #72)

kishorbhat commented 8 years ago

@hhirsch @Kwpolska Yup, that .git file was the problem. Thank you both for your time!

Kwpolska commented 8 years ago

Fixed in 1cca360.