Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-9618

File Editor is enforcing core.autocrlf=input and causing Git fatal exception

    XMLWordPrintable

Details

    Description

      Summary

      When using the new File Editor, whenever the Commit button is clicked, after specifying a commit message, the web interface shows an error message and does not allow the commit to be performed.

      Steps to Reproduce

      1. Make sure to be running Bitbucket Server 4.13.0 or newer version
      2. Browse to any file source and click the "Edit" button
      3. Edit anything and click "Commit"
      4. Type the commit message, or leave the one that gets written by default, then click "Commit"
      5. The web interface presents the following error message (see attached screenshot):
        '/usr/bin/git -c core.autocrlf=input commit -m file.txt edited online with Bitbucket -q -- file.txt' exited with code 128 saying: fatal: CRLF would be replaced by LF in file.txt.
        

      Expected Results

      • The File Editor should not enforce / hardcode "-c core.autocrlf=input" or accept using core.safecrlf=warn so as not to throw an error, and should allow the commit to be performed.

      Actual Results

      • The web interface presents the following error message:
        '/usr/bin/git -c core.autocrlf=input commit -m file.txt edited online with Bitbucket -q -- file.txt' exited with code 128 saying: fatal: CRLF would be replaced by LF in file.txt.
        
      • No errors are written in atlassian-bitbucket.log with regular logging.
      • Debug logging shows the following:
        2017-03-06 17:36:50,472 INFO  [hz.hazelcast.event-3]  com.atlassian.bitbucket Switching to log level [DEBUG]
        2017-03-06 17:36:50,472 ERROR [hz.hazelcast.event-4]  com.atlassian.event.remote Switching to log level [DEBUG]
        2017-03-06 17:36:50,472 INFO  [hz.hazelcast.event-5]  com.atlassian.stash Switching to log level [DEBUG]
        2017-03-06 17:36:50,472 WARN  [hz.hazelcast.event-1]  ROOT Switching to log level [INFO]
        2017-03-06 17:36:50,473 WARN  [hz.hazelcast.event-4]  org.hibernate Switching to log level [INFO]
        2017-03-06 17:36:50,473 WARN  [hz.hazelcast.event-3]  org.springframework Switching to log level [INFO]
        2017-03-06 17:36:50,473 WARN  [hz.hazelcast.event-5]  c.h.internal.monitors.HealthMonitor Switching to log level [DEBUG]
        2017-03-06 17:36:50,716 DEBUG [http-nio-8443-exec-24] fkraemer @1V3DR5Lx1056x48x1 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/api/latest/inbox/pull-requests/count HTTP/1.1" c.a.s.i.rest.inbox.InboxResource Retrieving pull request count for user fkraemer
        2017-03-06 17:36:54,250 DEBUG [http-nio-8443-exec-15] fkraemer @1V3DR5Lx1056x62x1 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/api/latest/inbox/pull-requests/count HTTP/1.1" c.a.s.i.rest.inbox.InboxResource Retrieving pull request count for user fkraemer
        2017-03-06 17:36:55,933 INFO  [http-nio-8443-exec-9] fkraemer @1V3DR5Lx1056x65x0 1468vi2 0:0:0:0:0:0:0:1 "GET /projects/PROJ/repos/git/browse HTTP/1.1" o.h.c.internal.StandardQueryCache HHH000248: Starting query cache at region: query.repositoryBySlug
        2017-03-06 17:36:55,978 DEBUG [http-nio-8443-exec-9] fkraemer @1V3DR5Lx1056x65x0 1468vi2 0:0:0:0:0:0:0:1 "GET /projects/PROJ/repos/git/browse HTTP/1.1" c.a.s.internal.scm.git.RawGitAgent /Users/fkraemer/atlassian/data/bitbucket/4.13.0/shared/data/repositories/1: No packed-refs exist (Packed-refs exists: false, Lines checked: 0)
        2017-03-06 17:36:55,982 DEBUG [http-nio-8443-exec-9] fkraemer @1V3DR5Lx1056x65x0 1468vi2 0:0:0:0:0:0:0:1 "GET /projects/PROJ/repos/git/browse HTTP/1.1" c.a.s.internal.scm.git.RawGitAgent PROJ/git[1]: Repository is not empty
        2017-03-06 17:36:56,042 DEBUG [http-nio-8443-exec-9] fkraemer @1V3DR5Lx1056x65x0 1468vi2 0:0:0:0:0:0:0:1 "GET /projects/PROJ/repos/git/browse HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed /usr/bin/git cat-file -t refs/heads/master:
        2017-03-06 17:36:56,067 DEBUG [http-nio-8443-exec-9] fkraemer @1V3DR5Lx1056x65x0 1468vi2 0:0:0:0:0:0:0:1 "GET /projects/PROJ/repos/git/browse HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed /usr/bin/git ls-tree -z -l refs/heads/master:
        2017-03-06 17:36:56,084 DEBUG [http-nio-8443-exec-9] fkraemer @1V3DR5Lx1056x65x0 1468vi2 0:0:0:0:0:0:0:1 "GET /projects/PROJ/repos/git/browse HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed /usr/bin/git cat-file --batch
        2017-03-06 17:36:56,358 DEBUG [http-nio-8443-exec-9] fkraemer @1V3DR5Lx1056x65x0 1468vi2 0:0:0:0:0:0:0:1 "GET /projects/PROJ/repos/git/browse HTTP/1.1" c.a.s.i.p.w.f.RequestCacheClientPageDataHandler Context bitbucket.branch.layout.actions.dropdown was required already. Ignoring.
        2017-03-06 17:36:56,358 DEBUG [http-nio-8443-exec-9] fkraemer @1V3DR5Lx1056x65x0 1468vi2 0:0:0:0:0:0:0:1 "GET /projects/PROJ/repos/git/browse HTTP/1.1" c.a.s.i.p.w.f.RequestCacheClientPageDataHandler Context bitbucket.web.repository.clone.dialog.options was required already. Ignoring.
        2017-03-06 17:36:56,606 DEBUG [http-nio-8443-exec-23] @1V3DR5Lx1056x68x2 1468vi2 0:0:0:0:0:0:0:1 "GET /s/bb12f021129630ca2e79de4fd0c9f1f8-T/1071493005/5467926/1/4ec67307c53555d0f7ea11a024829547/_/download/contextbatch/js/bitbucket.page.repository.filebrowser,bitbucket.layout.files,bitbucket.layout.branch,bitbucket.layout.repository,bitbucket.layout.base,atl.general,bitbucket.layout.entity,-_super/batch.js HTTP/1.1" c.a.s.i.i18n.PluginI18nService No values found in any valid locale for key no.issue.status.info and locales [en_US, en]
        2017-03-06 17:36:57,184 DEBUG [http-nio-8443-exec-23] @1V3DR5Lx1056x68x2 1468vi2 0:0:0:0:0:0:0:1 "GET /s/bb12f021129630ca2e79de4fd0c9f1f8-T/1071493005/5467926/1/4ec67307c53555d0f7ea11a024829547/_/download/contextbatch/js/bitbucket.page.repository.filebrowser,bitbucket.layout.files,bitbucket.layout.branch,bitbucket.layout.repository,bitbucket.layout.base,atl.general,bitbucket.layout.entity,-_super/batch.js HTTP/1.1" c.a.s.i.i18n.PluginI18nService No values found in any valid locale for key bitbucket.go.search.guide and locales [en_US, en]
        2017-03-06 17:36:57,185 DEBUG [http-nio-8443-exec-23] @1V3DR5Lx1056x68x2 1468vi2 0:0:0:0:0:0:0:1 "GET /s/bb12f021129630ca2e79de4fd0c9f1f8-T/1071493005/5467926/1/4ec67307c53555d0f7ea11a024829547/_/download/contextbatch/js/bitbucket.page.repository.filebrowser,bitbucket.layout.files,bitbucket.layout.branch,bitbucket.layout.repository,bitbucket.layout.base,atl.general,bitbucket.layout.entity,-_super/batch.js HTTP/1.1" c.a.s.i.i18n.PluginI18nService No values found in any valid locale for key bitbucket.go.search.troubleshoot and locales [en_US, en]
        2017-03-06 17:36:57,185 DEBUG [http-nio-8443-exec-23] @1V3DR5Lx1056x68x2 1468vi2 0:0:0:0:0:0:0:1 "GET /s/bb12f021129630ca2e79de4fd0c9f1f8-T/1071493005/5467926/1/4ec67307c53555d0f7ea11a024829547/_/download/contextbatch/js/bitbucket.page.repository.filebrowser,bitbucket.layout.files,bitbucket.layout.branch,bitbucket.layout.repository,bitbucket.layout.base,atl.general,bitbucket.layout.entity,-_super/batch.js HTTP/1.1" c.a.s.i.i18n.PluginI18nService No values found in any valid locale for key bitbucket.go.search.query and locales [en_US, en]
        2017-03-06 17:36:57,754 INFO  [http-nio-8443-exec-4] fkraemer @1V3DR5Lx1056x84x1 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/jira-integration/latest/servers HTTP/1.1" c.s.j.s.i.a.WebApplicationImpl Initiating Jersey application, version 'Jersey: 1.8-atlassian-16 03/23/2015 10:20 PM'
        2017-03-06 17:36:57,757 DEBUG [http-nio-8443-exec-14] fkraemer @1V3DR5Lx1056x86x3 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/api/latest/inbox/pull-requests/count HTTP/1.1" c.a.s.i.rest.inbox.InboxResource Retrieving pull request count for user fkraemer
        2017-03-06 17:36:57,759 INFO  [http-nio-8443-exec-11] fkraemer @1V3DR5Lx1056x85x2 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/sync/latest/projects/PROJ/repos/git HTTP/1.1" c.s.j.s.i.a.WebApplicationImpl Initiating Jersey application, version 'Jersey: 1.8-atlassian-16 03/23/2015 10:20 PM'
        2017-03-06 17:36:57,770 DEBUG [http-nio-8443-exec-7] fkraemer @1V3DR5Lx1056x83x0 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/api/latest/projects/PROJ/repos/git/last-modified HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed /usr/bin/git ls-tree bb8a30aff57df2c60ab5fbcc234f0fe3b5b66f16:
        2017-03-06 17:36:57,778 INFO  [http-nio-8443-exec-4] fkraemer @1V3DR5Lx1056x84x1 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/jira-integration/latest/servers HTTP/1.1" c.s.j.a.w.config.WadlGeneratorLoader Loading wadlGenerator com.sun.jersey.server.wadl.generators.WadlGeneratorApplicationDoc
        2017-03-06 17:36:57,778 INFO  [http-nio-8443-exec-4] fkraemer @1V3DR5Lx1056x84x1 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/jira-integration/latest/servers HTTP/1.1" c.s.j.a.w.config.WadlGeneratorLoader Loading wadlGenerator com.sun.jersey.server.wadl.generators.WadlGeneratorGrammarsSupport
        2017-03-06 17:36:57,779 INFO  [http-nio-8443-exec-4] fkraemer @1V3DR5Lx1056x84x1 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/jira-integration/latest/servers HTTP/1.1" c.s.j.a.w.config.WadlGeneratorLoader Loading wadlGenerator com.atlassian.plugins.rest.doclet.generators.resourcedoc.AtlassianWadlGeneratorResourceDocSupport
        2017-03-06 17:36:57,780 INFO  [http-nio-8443-exec-11] fkraemer @1V3DR5Lx1056x85x2 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/sync/latest/projects/PROJ/repos/git HTTP/1.1" c.s.j.a.w.config.WadlGeneratorLoader Loading wadlGenerator com.sun.jersey.server.wadl.generators.WadlGeneratorApplicationDoc
        2017-03-06 17:36:57,780 INFO  [http-nio-8443-exec-11] fkraemer @1V3DR5Lx1056x85x2 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/sync/latest/projects/PROJ/repos/git HTTP/1.1" c.s.j.a.w.config.WadlGeneratorLoader Loading wadlGenerator com.sun.jersey.server.wadl.generators.WadlGeneratorGrammarsSupport
        2017-03-06 17:36:57,781 INFO  [http-nio-8443-exec-11] fkraemer @1V3DR5Lx1056x85x2 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/sync/latest/projects/PROJ/repos/git HTTP/1.1" c.s.j.a.w.config.WadlGeneratorLoader Loading wadlGenerator com.atlassian.plugins.rest.doclet.generators.resourcedoc.AtlassianWadlGeneratorResourceDocSupport
        2017-03-06 17:36:57,847 DEBUG [io-pump:thread-8] fkraemer @1V3DR5Lx1056x83x0 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/api/latest/projects/PROJ/repos/git/last-modified HTTP/1.1" c.a.s.i.s.g.c.LastModifiedCommand PROJ/git[1]: After streaming all commits, modifications for 0 files were not found
        2017-03-06 17:36:57,848 DEBUG [http-nio-8443-exec-7] fkraemer @1V3DR5Lx1056x83x0 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/api/latest/projects/PROJ/repos/git/last-modified HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed /usr/bin/git log -c --format=%x03START%x04%ncommit %H%n%H%x02%P%x02%aN%x02%aE%x02%at%n%s%n%x03END%x04 --name-status --stdin --topo-order
        2017-03-06 17:36:57,851 DEBUG [http-nio-8443-exec-7] fkraemer @1V3DR5Lx1056x83x0 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/api/latest/projects/PROJ/repos/git/last-modified HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed /usr/bin/git rev-list --format=%H%x02%P%x02%aN%x02%aE%x02%at%n%B%n%x03END%x04 -1 bb8a30aff57df2c60ab5fbcc234f0fe3b5b66f16 --
        2017-03-06 17:36:57,974 INFO  [http-nio-8443-exec-11] fkraemer @1V3DR5Lx1056x85x2 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/sync/latest/projects/PROJ/repos/git HTTP/1.1" c.a.p.r.d.g.r.AtlassianWadlGeneratorResourceDocSupport Found atlassian-plugin.xml file! Looking for rest plugin module descriptors...
        2017-03-06 17:36:57,976 INFO  [http-nio-8443-exec-11] fkraemer @1V3DR5Lx1056x85x2 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/sync/latest/projects/PROJ/repos/git HTTP/1.1" c.a.p.r.d.g.r.AtlassianWadlGeneratorResourceDocSupport Found 0 rest plugin module descriptors.
        2017-03-06 17:36:57,978 INFO  [http-nio-8443-exec-4] fkraemer @1V3DR5Lx1056x84x1 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/jira-integration/latest/servers HTTP/1.1" c.a.p.r.d.g.r.AtlassianWadlGeneratorResourceDocSupport Found atlassian-plugin.xml file! Looking for rest plugin module descriptors...
        2017-03-06 17:36:57,980 INFO  [http-nio-8443-exec-4] fkraemer @1V3DR5Lx1056x84x1 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/jira-integration/latest/servers HTTP/1.1" c.a.p.r.d.g.r.AtlassianWadlGeneratorResourceDocSupport Found 0 rest plugin module descriptors.
        2017-03-06 17:36:58,168 INFO  [http-nio-8443-exec-11] fkraemer @1V3DR5Lx1056x85x2 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/sync/latest/projects/PROJ/repos/git HTTP/1.1" c.a.p.r.d.g.r.AtlassianWadlGeneratorResourceDocSupport Resource path of rest end point 'com.atlassian.stash.internal.repository.sync.rest.RefSyncResource' unchanged no mapping to rest plugin module descriptor found.
        2017-03-06 17:36:58,190 INFO  [http-nio-8443-exec-4] fkraemer @1V3DR5Lx1056x84x1 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/jira-integration/latest/servers HTTP/1.1" c.a.p.r.d.g.r.AtlassianWadlGeneratorResourceDocSupport Resource path of rest end point 'com.atlassian.internal.integration.jira.rest.JiraResource' unchanged no mapping to rest plugin module descriptor found.
        2017-03-06 17:36:58,190 INFO  [http-nio-8443-exec-4] fkraemer @1V3DR5Lx1056x84x1 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/jira-integration/latest/servers HTTP/1.1" c.a.p.r.d.g.r.AtlassianWadlGeneratorResourceDocSupport Resource path of rest end point 'com.atlassian.internal.integration.jira.rest.JiraServerResource' unchanged no mapping to rest plugin module descriptor found.
        2017-03-06 17:36:58,191 INFO  [http-nio-8443-exec-4] fkraemer @1V3DR5Lx1056x84x1 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/jira-integration/latest/servers HTTP/1.1" c.a.p.r.d.g.r.AtlassianWadlGeneratorResourceDocSupport Resource path of rest end point 'com.atlassian.internal.integration.jira.rest.JiraFieldsResource' unchanged no mapping to rest plugin module descriptor found.
        2017-03-06 17:37:00,661 DEBUG [http-nio-8443-exec-5] fkraemer @1V3DR5Lx1057x89x0 1468vi2 0:0:0:0:0:0:0:1 "GET /projects/PROJ/repos/git/browse/file.txt HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed /usr/bin/git cat-file -t refs/heads/master:file.txt
        2017-03-06 17:37:00,682 DEBUG [http-nio-8443-exec-5] fkraemer @1V3DR5Lx1057x89x0 1468vi2 0:0:0:0:0:0:0:1 "GET /projects/PROJ/repos/git/browse/file.txt HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed /usr/bin/git log --format=commit %H%n%H%x02%P%x02%aN%x02%aE%x02%at%n%B%n%x03END%x04 --no-min-parents --stdin --follow --name-status -- file.txt
        2017-03-06 17:37:00,819 DEBUG [http-nio-8443-exec-5] fkraemer @1V3DR5Lx1057x89x0 1468vi2 0:0:0:0:0:0:0:1 "GET /projects/PROJ/repos/git/browse/file.txt HTTP/1.1" c.a.s.i.p.w.f.RequestCacheClientPageDataHandler Context bitbucket.file-content.source.toolbar.primary was required already. Ignoring.
        2017-03-06 17:37:00,819 DEBUG [http-nio-8443-exec-5] fkraemer @1V3DR5Lx1057x89x0 1468vi2 0:0:0:0:0:0:0:1 "GET /projects/PROJ/repos/git/browse/file.txt HTTP/1.1" c.a.s.i.p.w.f.RequestCacheClientPageDataHandler Context bitbucket.file-content.source.toolbar.secondary was required already. Ignoring.
        2017-03-06 17:37:00,820 DEBUG [http-nio-8443-exec-5] fkraemer @1V3DR5Lx1057x89x0 1468vi2 0:0:0:0:0:0:0:1 "GET /projects/PROJ/repos/git/browse/file.txt HTTP/1.1" c.a.s.i.p.w.f.RequestCacheClientPageDataHandler Context bitbucket.branch.layout.actions.dropdown was required already. Ignoring.
        2017-03-06 17:37:00,820 DEBUG [http-nio-8443-exec-5] fkraemer @1V3DR5Lx1057x89x0 1468vi2 0:0:0:0:0:0:0:1 "GET /projects/PROJ/repos/git/browse/file.txt HTTP/1.1" c.a.s.i.p.w.f.RequestCacheClientPageDataHandler Context bitbucket.web.repository.clone.dialog.options was required already. Ignoring.
        2017-03-06 17:37:01,872 DEBUG [http-nio-8443-exec-8] @1V3DR5Lx1057x92x2 1468vi2 0:0:0:0:0:0:0:1 "GET /s/9192b262c760817fb4720189578855eb-T/1071493005/5467926/1/6e13bd08044383ed1c20ada85c3141ac/_/download/contextbatch/js/bitbucket.page.repository.fileContent,bitbucket.feature.files.fileHandlers,bitbucket.layout.files,bitbucket.layout.branch,bitbucket.layout.repository,bitbucket.layout.base,atl.general,bitbucket.layout.entity,-_super/batch.js HTTP/1.1" c.a.s.i.i18n.PluginI18nService No values found in any valid locale for key bitbucket.go.search.guide and locales [en_US, en]
        2017-03-06 17:37:01,873 DEBUG [http-nio-8443-exec-8] @1V3DR5Lx1057x92x2 1468vi2 0:0:0:0:0:0:0:1 "GET /s/9192b262c760817fb4720189578855eb-T/1071493005/5467926/1/6e13bd08044383ed1c20ada85c3141ac/_/download/contextbatch/js/bitbucket.page.repository.fileContent,bitbucket.feature.files.fileHandlers,bitbucket.layout.files,bitbucket.layout.branch,bitbucket.layout.repository,bitbucket.layout.base,atl.general,bitbucket.layout.entity,-_super/batch.js HTTP/1.1" c.a.s.i.i18n.PluginI18nService No values found in any valid locale for key bitbucket.go.search.troubleshoot and locales [en_US, en]
        2017-03-06 17:37:01,873 DEBUG [http-nio-8443-exec-8] @1V3DR5Lx1057x92x2 1468vi2 0:0:0:0:0:0:0:1 "GET /s/9192b262c760817fb4720189578855eb-T/1071493005/5467926/1/6e13bd08044383ed1c20ada85c3141ac/_/download/contextbatch/js/bitbucket.page.repository.fileContent,bitbucket.feature.files.fileHandlers,bitbucket.layout.files,bitbucket.layout.branch,bitbucket.layout.repository,bitbucket.layout.base,atl.general,bitbucket.layout.entity,-_super/batch.js HTTP/1.1" c.a.s.i.i18n.PluginI18nService No values found in any valid locale for key bitbucket.go.search.query and locales [en_US, en]
        2017-03-06 17:37:02,367 DEBUG [http-nio-8443-exec-21] fkraemer @1V3DR5Lx1057x94x0 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/api/latest/projects/PROJ/repos/git/browse/file.txt HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed /usr/bin/git cat-file -t master:file.txt
        2017-03-06 17:37:02,375 DEBUG [http-nio-8443-exec-21] fkraemer @1V3DR5Lx1057x94x0 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/api/latest/projects/PROJ/repos/git/browse/file.txt HTTP/1.1" c.a.s.i.s.g.DefaultGitCommandFactory Using git cat-file to retrieve content for file.txt at master
        2017-03-06 17:37:02,394 DEBUG [http-nio-8443-exec-1] fkraemer @1V3DR5Lx1057x95x1 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/api/latest/inbox/pull-requests/count HTTP/1.1" c.a.s.i.rest.inbox.InboxResource Retrieving pull request count for user fkraemer
        2017-03-06 17:37:02,395 DEBUG [http-nio-8443-exec-21] fkraemer @1V3DR5Lx1057x94x0 1468vi2 0:0:0:0:0:0:0:1 "GET /rest/api/latest/projects/PROJ/repos/git/browse/file.txt HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed /usr/bin/git cat-file -p master:file.txt
        2017-03-06 17:37:02,520 INFO  [http-nio-8443-exec-15] fkraemer @1V3DR5Lx1057x98x0 1468vi2 0:0:0:0:0:0:0:1 "POST /rest/webResources/1.0/resources HTTP/1.1" c.s.j.s.i.a.WebApplicationImpl Initiating Jersey application, version 'Jersey: 1.8-atlassian-16 03/23/2015 10:20 PM'
        2017-03-06 17:37:02,531 INFO  [http-nio-8443-exec-15] fkraemer @1V3DR5Lx1057x98x0 1468vi2 0:0:0:0:0:0:0:1 "POST /rest/webResources/1.0/resources HTTP/1.1" c.s.j.a.w.config.WadlGeneratorLoader Loading wadlGenerator com.sun.jersey.server.wadl.generators.WadlGeneratorApplicationDoc
        2017-03-06 17:37:02,531 INFO  [http-nio-8443-exec-15] fkraemer @1V3DR5Lx1057x98x0 1468vi2 0:0:0:0:0:0:0:1 "POST /rest/webResources/1.0/resources HTTP/1.1" c.s.j.a.w.config.WadlGeneratorLoader Loading wadlGenerator com.sun.jersey.server.wadl.generators.WadlGeneratorGrammarsSupport
        2017-03-06 17:37:02,532 INFO  [http-nio-8443-exec-15] fkraemer @1V3DR5Lx1057x98x0 1468vi2 0:0:0:0:0:0:0:1 "POST /rest/webResources/1.0/resources HTTP/1.1" c.s.j.a.w.config.WadlGeneratorLoader Loading wadlGenerator com.atlassian.plugins.rest.doclet.generators.resourcedoc.AtlassianWadlGeneratorResourceDocSupport
        2017-03-06 17:37:02,647 INFO  [http-nio-8443-exec-15] fkraemer @1V3DR5Lx1057x98x0 1468vi2 0:0:0:0:0:0:0:1 "POST /rest/webResources/1.0/resources HTTP/1.1" c.a.p.r.d.g.r.AtlassianWadlGeneratorResourceDocSupport Found atlassian-plugin.xml file! Looking for rest plugin module descriptors...
        2017-03-06 17:37:02,649 INFO  [http-nio-8443-exec-15] fkraemer @1V3DR5Lx1057x98x0 1468vi2 0:0:0:0:0:0:0:1 "POST /rest/webResources/1.0/resources HTTP/1.1" c.a.p.r.d.g.r.AtlassianWadlGeneratorResourceDocSupport Found 0 rest plugin module descriptors.
        2017-03-06 17:37:02,956 INFO  [http-nio-8443-exec-15] fkraemer @1V3DR5Lx1057x98x0 1468vi2 0:0:0:0:0:0:0:1 "POST /rest/webResources/1.0/resources HTTP/1.1" c.a.p.r.d.g.r.AtlassianWadlGeneratorResourceDocSupport Resource path of rest end point 'com.atlassian.webresource.plugin.rest.ListOfResources' unchanged no mapping to rest plugin module descriptor found.
        2017-03-06 17:37:02,957 INFO  [http-nio-8443-exec-15] fkraemer @1V3DR5Lx1057x98x0 1468vi2 0:0:0:0:0:0:0:1 "POST /rest/webResources/1.0/resources HTTP/1.1" c.a.p.r.d.g.r.AtlassianWadlGeneratorResourceDocSupport Resource path of rest end point 'com.atlassian.webresource.plugin.rest.CrossTenantCdnResource' unchanged no mapping to rest plugin module descriptor found.
        2017-03-06 17:37:02,957 INFO  [http-nio-8443-exec-15] fkraemer @1V3DR5Lx1057x98x0 1468vi2 0:0:0:0:0:0:0:1 "POST /rest/webResources/1.0/resources HTTP/1.1" c.a.p.r.d.g.r.AtlassianWadlGeneratorResourceDocSupport Resource path of rest end point 'com.atlassian.webresource.plugin.rest.PreBakeResource' unchanged no mapping to rest plugin module descriptor found.
        2017-03-06 17:37:02,957 INFO  [http-nio-8443-exec-15] fkraemer @1V3DR5Lx1057x98x0 1468vi2 0:0:0:0:0:0:0:1 "POST /rest/webResources/1.0/resources HTTP/1.1" c.a.p.r.d.g.r.AtlassianWadlGeneratorResourceDocSupport Resource path of rest end point 'com.atlassian.webresource.plugin.rest.DeprecatedDescriptors' unchanged no mapping to rest plugin module descriptor found.
        2017-03-06 17:37:18,128 DEBUG [http-nio-8443-exec-18] fkraemer @1V3DR5Lx1057x101x0 1468vi2 0:0:0:0:0:0:0:1 "PUT /rest/api/latest/projects/PROJ/repos/git/browse/file.txt HTTP/1.1" c.a.s.i.s.g.p.ShinyGitPorcelain 1: Cloning to /Users/fkraemer/atlassian/data/bitbucket/4.13.0/tmp/git/git-work72878588532133705.git
        2017-03-06 17:37:18,177 DEBUG [http-nio-8443-exec-18] fkraemer @1V3DR5Lx1057x101x0 1468vi2 0:0:0:0:0:0:0:1 "PUT /rest/api/latest/projects/PROJ/repos/git/browse/file.txt HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed /usr/bin/git clone --no-checkout --shared -b master /Users/fkraemer/atlassian/data/bitbucket/4.13.0/shared/data/repositories/1 /Users/fkraemer/atlassian/data/bitbucket/4.13.0/tmp/git/git-work72878588532133705.git
        2017-03-06 17:37:18,177 DEBUG [http-nio-8443-exec-18] fkraemer @1V3DR5Lx1057x101x0 1468vi2 0:0:0:0:0:0:0:1 "PUT /rest/api/latest/projects/PROJ/repos/git/browse/file.txt HTTP/1.1" c.a.b.s.g.c.GitCommandExitHandler /usr/bin/git clone --no-checkout --shared -b master /Users/fkraemer/atlassian/data/bitbucket/4.13.0/shared/data/repositories/1 /Users/fkraemer/atlassian/data/bitbucket/4.13.0/tmp/git/git-work72878588532133705.git did not fail, but the following was written to stderr:
        Cloning into '/Users/fkraemer/atlassian/data/bitbucket/4.13.0/tmp/git/git-work72878588532133705.git'...
        done.
        2017-03-06 17:37:18,177 DEBUG [http-nio-8443-exec-18] fkraemer @1V3DR5Lx1057x101x0 1468vi2 0:0:0:0:0:0:0:1 "PUT /rest/api/latest/projects/PROJ/repos/git/browse/file.txt HTTP/1.1" c.a.s.i.s.g.p.ShinyGitPorcelain 1: Resetting /Users/fkraemer/atlassian/data/bitbucket/4.13.0/tmp/git/git-work72878588532133705.git to clean the index
        2017-03-06 17:37:18,189 DEBUG [http-nio-8443-exec-18] fkraemer @1V3DR5Lx1057x101x0 1468vi2 0:0:0:0:0:0:0:1 "PUT /rest/api/latest/projects/PROJ/repos/git/browse/file.txt HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed /usr/bin/git reset --quiet bb8a30aff57df2c60ab5fbcc234f0fe3b5b66f16 --
        2017-03-06 17:37:18,204 DEBUG [http-nio-8443-exec-18] fkraemer @1V3DR5Lx1057x101x0 1468vi2 0:0:0:0:0:0:0:1 "PUT /rest/api/latest/projects/PROJ/repos/git/browse/file.txt HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed /usr/bin/git cat-file --batch
        2017-03-06 17:37:18,220 DEBUG [http-nio-8443-exec-18] fkraemer @1V3DR5Lx1057x101x0 1468vi2 0:0:0:0:0:0:0:1 "PUT /rest/api/latest/projects/PROJ/repos/git/browse/file.txt HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed /usr/bin/git status --short -- file.txt
        2017-03-06 17:37:18,233 DEBUG [http-nio-8443-exec-18] fkraemer @1V3DR5Lx1057x101x0 1468vi2 0:0:0:0:0:0:0:1 "PUT /rest/api/latest/projects/PROJ/repos/git/browse/file.txt HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed /usr/bin/git -c core.autocrlf=input commit -m file.txt edited online with Bitbucket -q -- file.txt
        2017-03-06 17:37:18,267 DEBUG [http-nio-8443-exec-18] fkraemer @1V3DR5Lx1057x101x0 1468vi2 0:0:0:0:0:0:0:1 "PUT /rest/api/latest/projects/PROJ/repos/git/browse/file.txt HTTP/1.1" c.a.s.i.r.e.ServiceExceptionMapper Mapping ServiceException to REST response 500
        com.atlassian.bitbucket.scm.CommandFailedException: '/usr/bin/git -c core.autocrlf=input commit -m file.txt edited online with Bitbucket -q -- file.txt' exited with code 128 saying: fatal: CRLF would be replaced by LF in file.txt.
                at com.atlassian.bitbucket.scm.DefaultCommandExitHandler.onError(DefaultCommandExitHandler.java:46) ~[bitbucket-spi-4.13.0.jar:na]
                at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.evaluateThrowable(GitCommandExitHandler.java:104) ~[na:na]
                at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.onError(GitCommandExitHandler.java:201) ~[na:na]
                at com.atlassian.bitbucket.scm.DefaultCommandExitHandler.onExit(DefaultCommandExitHandler.java:31) ~[bitbucket-spi-4.13.0.jar:na]
                at com.atlassian.bitbucket.scm.BaseCommand.callExitHandler(BaseCommand.java:146) ~[bitbucket-spi-4.13.0.jar:na]
                at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.internalGet(BaseCommand.java:280) ~[bitbucket-spi-4.13.0.jar:na]
                at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.get(BaseCommand.java:244) ~[bitbucket-spi-4.13.0.jar:na]
                at com.atlassian.bitbucket.scm.BaseCommand.call(BaseCommand.java:83) ~[bitbucket-spi-4.13.0.jar:na]
                at com.atlassian.stash.internal.scm.git.command.SimpleGitCommand.configureAndCall(SimpleGitCommand.java:84) ~[na:na]
                at com.atlassian.stash.internal.scm.git.command.file.EditFileCommand.call(EditFileCommand.java:115) ~[na:na]
                at com.atlassian.stash.internal.scm.git.command.file.EditFileCommand.call(EditFileCommand.java:62) ~[na:na]
                at com.atlassian.stash.internal.content.DefaultContentService.editFile(DefaultContentService.java:107) ~[bitbucket-service-impl-4.13.0.jar:na]
                at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) ~[atlassian-plugins-core-4.2.4.jar:na]
                at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) ~[na:na]
                at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) ~[na:na]
                at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) ~[na:na]
                at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) ~[na:na]
                at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) ~[na:na]
                at com.atlassian.stash.internal.rest.content.ContentResource.editFile(ContentResource.java:223) ~[bitbucket-rest-4.13.0.jar:na]
                at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) [applinks-plugin-5.2.4_1484801054000.jar:na]
                at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) [applinks-plugin-5.2.4_1484801054000.jar:na]
                at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) [applinks-plugin-5.2.4_1484801054000.jar:na]
                at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) [applinks-plugin-5.2.4_1484801054000.jar:na]
                at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) [applinks-plugin-5.2.4_1484801054000.jar:na]
                at com.atlassian.analytics.client.filter.UniversalAnalyticsFilter.doFilter(UniversalAnalyticsFilter.java:92) [analytics-client-5.2.20_1484801054000.jar:na]
                at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:39) [analytics-client-5.2.20_1484801054000.jar:na]
                at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) [classes/:na]
                at com.atlassian.plugin.connect.plugin.auth.scope.ApiScopingFilter.doFilter(ApiScopingFilter.java:81) [atlassian-connect-plugin-1.1.86-bitbucket-04.jar:na]
                at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) [classes/:na]
                at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:88) [classes/:na]
                at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:112) [classes/:na]
                at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75) [classes/:na]
                at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:94) [atlassian-trusted-apps-core-4.2.0.jar:na]
                at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:67) [atlassian-oauth-service-provider-plugin-2.0.3_1484801054000.jar:na]
                at com.atlassian.core.filters.ServletContextThreadLocalFilter.doFilter(ServletContextThreadLocalFilter.java:21) [atlassian-core-4.6.19.jar:na]
                at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) [atlassian-core-4.6.19.jar:na]
                at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) [classes/:na]
                at com.atlassian.plugin.connect.plugin.auth.user.ThreeLeggedAuthFilter.doFilter(ThreeLeggedAuthFilter.java:109) [atlassian-connect-plugin-1.1.86-bitbucket-04.jar:na]
                at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:32) [jwt-plugin-1.5.11-0002_1484801054000.jar:na]
                at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:38) [analytics-client-5.2.20_1484801054000.jar:na]
                at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:39) [analytics-client-5.2.20_1484801054000.jar:na]
                at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) [classes/:na]
                at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:90) [classes/:na]
                at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:73) [classes/:na]
                at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:83) ~[bitbucket-service-impl-4.13.0.jar:na]
                at com.atlassian.stash.internal.hazelcast.ConfigurableWebFilter.doFilter(ConfigurableWebFilter.java:38) ~[classes/:na]
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_111]
                at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_111]
                ... 293 frames trimmed
        Caused by: com.atlassian.utils.process.ProcessException: Non-zero exit code: 128
                at com.atlassian.bitbucket.scm.SummarizingProcessHandler.complete(SummarizingProcessHandler.java:47) ~[bitbucket-spi-4.13.0.jar:na]
                at com.atlassian.utils.process.ExternalProcessImpl.wrapUpProcess(ExternalProcessImpl.java:682) ~[atlassian-processutils-1.7.8.jar:na]
                at com.atlassian.utils.process.ExternalProcessImpl.finish(ExternalProcessImpl.java:161) ~[atlassian-processutils-1.7.8.jar:na]
                at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.get(BaseCommand.java:242) ~[bitbucket-spi-4.13.0.jar:na]
                ... 42 common frames omitted
        
      • Adding safecrlf=warn to the [core] section of <BITBUCKET_HOME>/shared/data/repositories/1/config does not help.

      Workaround

      Set core.safecrlf to warn

      git config --global core.safecrlf warn
      

      Attachments

        Issue Links

          Activity

            People

              jthomas@atlassian.com Justin Thomas
              fkraemer Felipe Kraemer
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: