Cannot identify HEAD for git repository.
See original GitHub issueI have django 1.8 python 3.5 raven 5.26.0 And I have followed django integration after executing:
python3 projectname/manage.py raven test
I have got
raven.exceptions.InvalidGitRepository: Cannot identify HEAD for git repository at /home/faja/Pulpit/Projekty/mainProjectFolder/djangoFolder/mainAppWithSettings
My project structure
zdobadzszczyt/
└── zdobadzszczyt
├── config
├── landingpage
│ └── migrations
├── socialauth
│ └── migrations
├── static
├── staticfiles
│ └── admin
│ ├── css
│ ├── img
│ │ └── gis
│ └── js
│ └── admin
├── templates
└── workout
├── management
│ ├── commands
└── migrations
Issue Analytics
- State:
- Created 7 years ago
- Reactions:8
- Comments:13 (2 by maintainers)
Top Results From Across the Web
Raven fails to identify HEAD git revision for Django on Heroku
Raven fails to identify HEAD git revision for Django on Heroku ... remote: 'Cannot identify HEAD for git repository at %s' % (path,))...
Read more >Setting a valid HEAD on your Git repository | Fisheye
The Not a valid object name HEAD in the message above indicates that your Git HEAD ref is invalid. This means that Fisheye...
Read more >Cannot identify HEAD for git repository. - Bountysource
I have django 1.8 python 3.5 raven 5.26.0. And I have followed django integration after executing: python3 projectname/manage.py raven test.
Read more >Why does git not recognise my local repository? - Stack Overflow
1. My guess (and probably most common reason for this): you think you're in the right directory but for one reason or another...
Read more >How to Fix the “fatal: not a git repository” Error - ContainIQ
Make sure you correctly typed the name of the directory. · Check that you correctly created the repo. If the directory doesn't contain...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think it’s a documentation issue. I followed the quick installation instructions on my sentry instance, which suggests this line
in your
settings.py
. But if yoursettings.py
is like mine one folder down from your git root folder, then you get the error you describe (because of this: https://github.com/getsentry/raven-python/blob/master/raven/versioning.py#L22). Instead follow https://docs.sentry.io/clients/python/integrations/django/ and replace the line with:and you’re in business!
I have tried all of the above and it didn’t work for a Django Project I have been working on. We’re using Heroku also if that is relavant. What eventually worked for me is:
Where BASE_DIR is set in the settings file which resides in the project folder one level up from the root of the project. The project settings file is specified using an environmental variable:
Hope this helps anyone else with a similar problem