0

I am unable to run the bfg jar command over the git repo I am trying to clean.

Java version "1.8.0_201" JDK version 1.8.0_201 MacOs Sierra 10.13.3

I downloaded BFG to /usr/local/bin So total path is /usr/local/bin/bfg-1.11.6.jar

If I run:

java -jar /usr/local/bin/bfg-1.11.6.jar --delete-files .git

I keep getting 'Error: Unable to access jarfile /usr/local/bin/bfg-1.11.6.jar'

I cannot believe this is the best way of doing a manual clean up of git? Reading this -> one Error: Unable to access jarfile bfg.jar - BFG did not help.

Any thoughts?

godhar
  • 1,128
  • 1
  • 14
  • 34
  • 1
    could be a permissions problem, update the permissions of the jar or move to a public directory and try using it from there – David Florez Mar 06 '19 at 23:52
  • 1
    Take a look here - https://stackoverflow.com/questions/11943948/what-causes-unable-to-access-jar-file-error May be it will be helpful – Bor Laze Mar 06 '19 at 23:55
  • I tried moving it to my home dir and tried from there, no success. I then did a fresh install with homebrew and it made usr/local/bin/bfg . Then I run java -jar usr/local/bin/bfg --delete-files emailConfig.js git@github.com:project.git with no success, I get Error: Unable to access jarfile usr/local/bin/bfg. STUCK! – godhar Mar 07 '19 at 21:20
  • You are on MacOS - are you sure you checked this answer on the previously-linked question: https://stackoverflow.com/a/46727738/452210 ? – javabrett Mar 25 '19 at 20:38

1 Answers1

0

I had not installed the sbt console and ran bfg/assembly on the scala files; this is what actually gave me the jar executable in the end.

This urls helped me with this issue;

https://github.com/rtyley/bfg-repo-cleaner/issues/191

godhar
  • 1,128
  • 1
  • 14
  • 34