yogeshojha / rengine

reNgine is an automated reconnaissance framework for web applications with a focus on highly configurable streamlined recon process via Engines, recon data correlation and organization, continuous monitoring, backed by a database, and simple yet intuitive User Interface. reNgine makes it easy for penetration testers to gather reconnaissance with minimal configuration and with the help of reNgine's correlation, it just makes recon effortless.
https://yogeshojha.github.io/rengine/
GNU General Public License v3.0
7.5k stars 1.14k forks source link

fatal: not a git repository (or any of the parent directories): .git #1022

Closed Teicu closed 8 months ago

Teicu commented 1 year ago

Is there an existing issue for this?

Current Behavior

Does anyone have any idea why I get this error when I try to update to the latest version?

sudo ./update.sh Password: Do you want to apply your local changes after updating? (y/n) y COMPOSE_DOCKER_CLI_BUILD=1 docker-compose -f docker-compose.yml down [+] Running 7/7 ✔ Container rengine-proxy-1 Removed 0.4s ✔ Container rengine-web-1 Removed 10.2s ✔ Container rengine-celery-beat-1 Removed 0.0s ✔ Container rengine-celery-1 Removed 10.5s ✔ Container rengine-db-1 Removed 0.2s ✔ Container rengine-redis-1 Removed 0.2s ✔ Network rengine_rengine_network Removed 0.1s fatal: not a git repository (or any of the parent directories): .git

Expected Behavior

x

Steps To Reproduce

sudo ./update.sh

Environment

- reNgine: 2.0.0
- OS: MacOS
- Python: 
- Docker Engine: 
- Docker Compose: 
- Browser:

Anything else?

No response

github-actions[bot] commented 1 year ago

👋 Hi @Teicu, Issues is only for reporting a bug/feature request. Please read documentation before raising an issue https://rengine.wiki For very limited support, questions, and discussions, please join reNgine Discord channel: https://discord.gg/azv6fzhNCE Please include all the requested and relevant information when opening a bug report. Improper reports will be closed without any response.

AnonymousWP commented 1 year ago

Are you in the rengine folder when trying to run update.sh?

Teicu commented 1 year ago

Hi, yes of course.

Teicu commented 1 year ago

root@pentest rengine % sudo ./update.sh Do you want to apply your local changes after updating? (y/n) y COMPOSE_DOCKER_CLI_BUILD=1 docker-compose -f docker-compose.yml down No local changes to save hint: You have divergent branches and need to specify how to reconcile them. hint: You can do so by running one of the following commands sometime before hint: your next pull: hint: hint: git config pull.rebase false # merge hint: git config pull.rebase true # rebase hint: git config pull.ff only # fast-forward only hint: hint: You can replace "git config" with "git config --global" to set a default hint: preference for all repositories. You can also pass --rebase, --no-rebase, hint: or --ff-only on the command line to override the configured default per hint: invocation. fatal: Need to specify how to reconcile divergent branches.

AnonymousWP commented 1 year ago

Try git init, otherwise follow the steps that Git outputted for you as per your comment above.

Teicu commented 1 year ago

sudo ./update.sh Do you want to apply your local changes after updating? (y/n) y COMPOSE_DOCKER_CLI_BUILD=1 docker-compose -f docker-compose.yml down No local changes to save hint: You have divergent branches and need to specify how to reconcile them. hint: You can do so by running one of the following commands sometime before hint: your next pull: hint: hint: git config pull.rebase false # merge hint: git config pull.rebase true # rebase hint: git config pull.ff only # fast-forward only hint: hint: You can replace "git config" with "git config --global" to set a default hint: preference for all repositories. You can also pass --rebase, --no-rebase, hint: or --ff-only on the command line to override the configured default per hint: invocation. fatal: Need to specify how to reconcile divergent branches. root@pentest rengine % sudo git config pull.rebase false root@pentest rengine % sudo git config pull.rebase true root@pentest rengine % sudo git config pull.ff only root@pentest rengine % sudo ./update.sh Do you want to apply your local changes after updating? (y/n) y COMPOSE_DOCKER_CLI_BUILD=1 docker-compose -f docker-compose.yml down No local changes to save hint: Diverging branches can't be fast-forwarded, you need to either: hint: hint: git merge --no-ff hint: hint: or: hint: hint: git rebase hint: hint: Disable this message with "git config advice.diverging false" fatal: Not possible to fast-forward, aborting. root@pentest rengine % git merge --no-ff fatal: refusing to merge unrelated histories root@pentest rengine % sudo git merge --no-ff fatal: refusing to merge unrelated histories root@pentest rengine % sudo git rebase error: The following untracked working tree files would be overwritten by checkout: .dockerignore .gitattributes .github/CODE_OF_CONDUCT.md .github/CONTRIBUTING.md .github/FUNDING.yml .github/ISSUE_TEMPLATE/bug_report.yaml .github/ISSUE_TEMPLATE/feature_request.yml .github/SECURITY.md .github/SPONSORS.md .github/screenshots/banner.gif .github/screenshots/scan_results.gif .github/workflows/auto-comment.yml .github/workflows/build-pr.yml .github/workflows/build.yml .github/workflows/codeql-analysis.yml .gitignore CHANGELOG.md CONTRIBUTORS.md LICENSE Makefile _config.yml certs/Dockerfile certs/entrypoint.sh config/nginx/rengine.conf docker-compose.dev.yml docker-compose.setup.yml docker-compose.yml install.sh make.bat scripts/uninstall.sh update.sh web/.gitignore web/Dockerfile web/api/init.py web/api/serializers.py web/api/urls.py web/api/views.py web/beat-entrypoint.sh web/celery-entrypoint.sh web/dashboard/init.py web/dashboard/admin.py web/dashboard/apps.py web/dashboard/migrations/0001_initial.py web/dashboard/migrations/0002_rename_name_searchhistory_query.py web/dashboard/migrations/0003_projects.py web/dashboard/migrations/0004_rename_projects_project.py web/dashboard/migrations/0005_alter_project_slug.py web/dashboard/migrations/0006_project_insert_date.py web/dashboard/migrations/0007_netlasapikey_openaiapikey.py web/dashboard/migrations/0007_openaikeys.py web/dashboard/migrations/0008_merge_0007_netlasapikey_openaiapikey_0007_openaikeys.py web/dashboard/migrations/0009_delete_openaikeys.py web/dashboard/migrations/init.py web/dashboard/models.py web/dashboard/templates/dashboard/admin.html web/dashboard/templates/dashboard/index.html web/dashboard/templates/dashboard/onboarding.html web/dashboard/templates/dashboard/profile.html web/dashboard/templates/dashboard/projects.html web/dashboard/templates/dashboard/search.html web/dashboard/tests.py web/dashboard/urls.py web/dashboard/views.py web/entrypoint.sh web/fixtures/default_keywords.yaml web/fixtures/default_scan_engines.yaml web/fixtures/external_tools.yaml web/manage.py web/reNgine/init.py web/reNgine/celery.py web/reNgine/celery_custom_task.py web/reNgine/common_func.py web/reNgine/common_serializers.py web/reNgine/context_processors.py web/reNgine/definitions.py web/reNgine/gpt.py web/reNgine/init.py web/reNgine/roles.py web/reNgine/settings.py web/reNgine/tasks.py web/reNgine/urls.py web/reNgine/utilities.py web/reNgine/validators.py web/reNgine/wsgi.py web/recon_note/init.py web/recon_note/admin.py web/recon_note/apps.py web/recon_note/migrations/0001_initial.py web/recon_note/migrations/0002_todonote_project.py web/recon_note/migrations/init.py web/recon_note/models.py web/recon_note/static/note/js/todo.js web/recon_note/templates/note/index.html web/recon_note/tests.py web/recon_note/urls.py web/recon_note/views.py web/scanEngine/init.py web/scanEngine/admin.py web/scanEngine/apps.py web/scanEngine/forms.py web/scanEngine/management/commands/dumpcustomengines.py web/scanEngine/management/commands/loadcustomengines.py web/scanEngine/migrations/0001_initial.py web/scanEngine/migrations/0002_auto_20220526_1457.py web/scanEngine/migrations/0003_enginetype_waf_detection.py web/scanEngine/migrations/0004_auto_20220816_0946.py web/scanEngine/migrations/0005_notification_send_scan_tracebacks.py web/scanEngine/migrations/0006_alter_installedexternaltool_version_lookup_command.py web/scanEngine/migrations/init.py web/scanEngine/models.py web/scanEngine/static/scanEngine/js/custom_scan_engine.js web/scanEngine/static/scanEngine/js/custom_tools.js web/scanEngine/static/scanEngine/js/tool_arsenal.js web/scanEngine/templates/scanEngine/_items/form_engine.html web/scanEngine/templates/scanEngine/add_engine.html web/scanEngine/templates/scanEngine/index.html web/scanEngine/templates/scanEngine/lookup.html web/scanEngine/templates/scanEngine/settings/_items/external_tool_form.html web/scanEngine/templates/scanEngine/sett Aborting error: could not detach HEAD

Teicu commented 1 year ago

rengine % sudo ./update.sh Do you want to apply your local changes after updating? (y/n) y COMPOSE_DOCKER_CLI_BUILD=1 docker-compose -f docker-compose.yml down [+] Running 1/0 ✔ Network rengine_default Removed 0.0s Saved working directory and index state WIP on (no branch): 133a8ca9 Merge pull request #1020 from AnonymousWP/bump-to-2.0.1 You are not currently on a branch. Please specify which branch you want to rebase against. See git-pull(1) for details.

git pull <remote> <branch>
AnonymousWP commented 1 year ago

I just told you what to do, but you didn't try that yet it seems.

Teicu commented 1 year ago

I just told you what to do, but you didn't try that yet it seems.

I already did, but it's still useless

root@pentest rengine % sudo git init Reinitialized existing Git repository in /Users/root/rengine/.git/

sudo ./update.sh Do you want to apply your local changes after updating? (y/n) y COMPOSE_DOCKER_CLI_BUILD=1 docker-compose -f docker-compose.yml down Warning: No resource found to remove for project "rengine". No local changes to save Already up to date. On branch master Your branch is ahead of 'origin/master' by 3 commits. (use "git push" to publish your local commits)

nothing to commit, working tree clean COMPOSE_DOCKER_CLIBUILD=1 docker-compose -f docker-compose.yml build db web proxy redis celery celery-beat parsing /Users/root/rengine/docker-compose.yml: yaml: line 99: could not find expected ':' make: *** [build] Error 15

AnonymousWP commented 1 year ago
  1. Try choosing n this time when it asks you if you want to apply local changes
  2. Which version of Docker Engine are you running?
  3. Which version of Docker Compose are you running?

Last two were part of the issue template, but you didn't fill it in.

Teicu commented 1 year ago

All good for now, thank you very much. Unfortunately, I have a new problem. Honestly, if I had known what to expect with this update I would have preferred to stay with version 2.0.0.

I restarted Docker (Docker Desktop 4.24.2 (124339) is currently the newest version available.) several times, the allocated resources are shown in the image, and I keep getting the error 502 Bad Gateway in the browser.

Screenshot 2023-10-26 at 13 19 49 Screenshot 2023-10-26 at 13 18 33 Screenshot 2023-10-26 at 13 17 29
AnonymousWP commented 1 year ago

All good for now, thank you very much. Unfortunately, I have a new problem. Honestly, if I had known what to expect with this update I would have preferred to stay with version 2.0.0.

I restarted Docker (Docker Desktop 4.24.2 (124339) is currently the newest version available.) several times, the allocated resources are shown in the image, and I keep getting the error 502 Bad Gateway in the browser.

Screenshot 2023-10-26 at 13 19 49 Screenshot 2023-10-26 at 13 18 33 Screenshot 2023-10-26 at 13 17 29

How did you fix the initial issue?

Are all Docker containers still running? Also, you can't allocate so many resources if the host doesn't have them available either. Are you too using WSL 2?

Teicu commented 1 year ago

I changed with arm below in Dockerfile

RUN wget https://golang.org/dl/go1.20.linux-arm64.tar.gz RUN tar -xvf go1.20.linux-arm64.tar.gz RUN rm go1.20.linux-arm64.tar.gz RUN mv go /usr/local

I also replaced the old docker-compose.yml with the new one from here

I don't use WSL 2, I honestly don't even know what it is.

services are all runing

Screenshot 2023-10-26 at 14 31 01 Screenshot 2023-10-26 at 14 30 25
psyray commented 12 months ago

@Teicu Did your setup works now ? If yes explain what you have did, thanks

jayjani007 commented 11 months ago

any solution for 502 Bad Gateway. I am getting the same.

AnonymousWP commented 11 months ago

any solution for 502 Bad Gateway. I am getting the same.

What have you tried so far?

psyray commented 11 months ago

For all those with 502 Bad gateway Could you provide your docker-compose.yml please ?

jayjani007 commented 11 months ago

docker-compose.txt

psyray commented 11 months ago

docker-compose.txt

Seems good. So as @AnonymousWP said what have you tried so far?

psyray commented 8 months ago

@jayjani007 No feedback for 3 month, closing issue Feel free to open a new one if problem persists