{"record":{"id":"48440cfa09c13232","repo":"ytti/oxidized","slug":"first-e-message-was-raised-while-opening-git-48440c","errorCode":null,"errorMessage":"first '#{e.message}' was raised while opening git repo, then '#{create_error.message}' was while trying to create git repo","messagePattern":"first '#(.+?)' was raised while opening git repo, then '#(.+?)' was while trying to create git repo","errorType":"exception","errorClass":"Oxidized::Output::GitCrypt::GitCryptError","httpStatus":null,"severity":"error","filePath":"lib/oxidized/output/gitcrypt.rb","lineNumber":210,"sourceCode":"            file = ::File.join @opt[:group], file\n          else\n            repo = if repo.is_a?(::String)\n                     ::File.join ::File.dirname(repo), @opt[:group] + '.git'\n                   else\n                     repo[@opt[:group]]\n                   end\n          end\n        end\n\n        begin\n          update_repo repo, file, data, @msg, @user, @email\n        rescue Git::GitExecuteError, ArgumentError => e\n          logger.debug \"open_error #{e} #{file}\"\n          begin\n            grepo = Git.init repo\n            crypt_init grepo\n          rescue StandardError => create_error\n            raise GitCryptError, \"first '#{e.message}' was raised while opening git repo, then \" \\\n                                 \"'#{create_error.message}' was while trying to create git repo\"\n          end\n          retry\n        end\n      end\n\n      def update_repo(repo, file, data, msg, user, email)\n        grepo = Git.open repo\n        grepo.config('user.name', user)\n        grepo.config('user.email', email)\n        grepo.chdir do\n          unlock grepo\n          ::File.write(file, data)\n          grepo.add(file)\n          if grepo.status[file].nil? || !grepo.status[file].type.nil?\n            grepo.commit(msg)\n            @commitref = grepo.log(1).first.objectish\n            true","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/ytti/oxidized/blob/687ed4262d9d21e54662e872e2383386d8498f7b/lib/oxidized/output/gitcrypt.rb#L192-L228","documentation":"Error \"first '#{e.message}' was raised while opening git repo, then '#{create_error.message}' was while trying to create git repo\" thrown in ytti/oxidized.","triggerScenarios":"Thrown at lib/oxidized/output/gitcrypt.rb:210 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"687ed4262d9d21e54662e872e2383386d8498f7b","analyzedAt":"2026-08-23T11:19:42.084Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}