Sublime Forum

Git failed with exit code 128

#1

Hello,

all of my accesses to the remote repository (fetch, push, pull) end with exit code 128, but only with Sublime Merge.

The full message is:
Last Command: git fetch origin
Status: Failed
Error: git failed with exit code 128
Permission denied, please try again.
Permission denied, please try again.
username@git.hidrive.strato.com: Permission denied (publickey, password).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.

My environment is:
macOS Mojave 10.14.1
Sublime Merge: Build 1084
git 2.19.0 (system)

This issue doesn’t appear if I use SourceTree.
When I use the terminal, I have to enter the password. But then it works.

However, I noticed that the path to the repository in the error message is incomplete, because according to Strato it must follow the following format:
username@git.hidrive.strato.com:/users/username/path/gitRepo.git

Source: https://www.strato.de/faq/article/2318/Wie-verwende-ich-das-Git-Repository-meines-STRATO-HiDrives.html

I would like to buy the software because I really like the sublime text style, but unfortunately I don’t get this problem solved. I am therefore grateful for any help.

Many greetings
Daniel

0 Likes

Sublime Merge SSH Failing when Key has password
#2

I have similar issues with remotes on Windows 10. Version 1065 had no issues but with every version since I only get

fatal: NullReferenceException encountered
fatal: could not read Username for 'https://example.org': terminal prompts disabled

when trying to push.

If I try to clone a repository I get “git failed with exit code 128”.

0 Likes

#3

Is no one else having this problem? :disappointed:

I made a fresh Windows install and it’s still not working. So it’s unlikely due to some old config. The remote (Gitea) should be fine since 1065, Tower and GitKraken all work.

0 Likes

#4

I updated to BUILD 1092 and it’s still not working. That’s so annoying. :disappointed:

0 Likes

#5

@_se I’ve seen that issue before if I have Git configured to use plink, but then pageant isn’t running.

@blade1510 It sounds like an issue with an authentication helper of some sort.

0 Likes

#6

Is there a logfile that could provide information? I would like to provide you with all the data you need to fix this problem.

0 Likes

#7

See Help > Debug Information.

0 Likes

#8

=== App Version Information ===
Build: 1092

=== Git Version Information ===
Using Git: git (system)
git version 2.19.0
PATH: /usr/local/lib/python2.7/site-packages:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/MacOS (from shell)
environment variables loaded using: /bin/bash -l

=== Browse Page Information ===
HEAD: xxxxxxxxxxxxxx06b84f0ab58cebeab012b9c0438
Is in merge: 0
Is in cherry_pick: 0
Is in rebase: 0
Is in revert: 0

=== Git Status Information ===

=== Our Status Information ===

=== Git Config Information ===
alias.a=!git add . && git status
alias.aa=!git add . && git add -u . && git status
alias.ac=!git add . && git commit
alias.acm=!git add . && git commit -m
alias.alias=!git config --list | grep ‘alias.’ | sed ‘s/alias.([^=])=(.)/\1\ => \2/’ | sort
alias.au=!git add -u . && git status
alias.c=commit
alias.ca=commit --amend
alias.cm=commit -m
alias.d=diff
alias.l=log --graph --all --pretty=format:’%C(yellow)%h%C(cyan)%d%Creset %s %C(white)- %an, %ar%Creset’
alias.lg=log --color --graph --pretty=format:’%C(bold white)%h%Creset -%C(bold green)%d%Creset %s %C(bold green)(%cr)%Creset %C(bold blue)<%an>%Creset’ --abbrev-commit --date=relative
alias.ll=log --stat --abbrev-commit
alias.llg=log --color --graph --pretty=format:’%C(bold white)%H %d%Creset%n%s%n%+b%C(bold blue)%an <%ae>%Creset %C(bold green)%cr (%ci)’ --abbrev-commit
alias.master=checkout master
alias.s=status
alias.spull=svn rebase
alias.spush=svn dcommit
branch.master.merge=refs/heads/master
branch.master.remote=origin
color.interactive=auto
color.ui=auto
commit.template=/Users/username/.stCommitMsg
core.bare=false
core.excludesfile=/Users/username/.gitignore_global
core.filemode=true
core.ignorecase=true
core.legacyheaders=false
core.logallrefupdates=true
core.precomposeunicode=true
core.quotepath=false
core.repositoryformatversion=0
credential.helper=cache --timeout=0
diff.exif.textconv=exif
difftool.sourcetree.cmd=opendiff “$LOCAL” “$REMOTE”
difftool.sourcetree.path=
include.path=.gitcredential
mergetool.keepbackup=true
mergetool.sourcetree.cmd=/Applications/SourceTree.app/Contents/Resources/opendiff-w.sh “$LOCAL” “$REMOTE” -ancestor “$BASE” -merge “$MERGED”
mergetool.sourcetree.trustexitcode=true
push.default=simple
remote.origin.fetch=+refs/heads/:refs/remotes/origin/
remote.origin.url=username@git.hidrive.strato.com:/users/username/git/repo.git
repack.usedeltabaseoffset=true
user.email=mail@username.de
user.name=User Name

=== Our Config Information ===
Git Config Path Information
Using config path: /etc/gitconfig
Using config path: /Users/username/.config/git/config
Using config path: /Users/username/.gitconfig
Using config path: /Users/username/repo/.git/config

Our config output is different to the Git config output
branch.master.merge=refs/heads/master
branch.master.remote=origin
commit.template=/Users/username/.stCommitMsg
core.bare=false
core.excludesfile=/Users/username/.gitignore_global
core.filemode=true
core.ignorecase=true
core.logallrefupdates=true
core.precomposeunicode=true
core.repositoryformatversion=0
credential.helper=cache --timeout=0
difftool.sourcetree.cmd=opendiff “$LOCAL” “$REMOTE”
difftool.sourcetree.path=
mergetool.sourcetree.cmd=/Applications/SourceTree.app/Contents/Resources/opendiff-w.sh “$LOCAL” “$REMOTE” -ancestor “$BASE” -merge “$MERGED”
mergetool.sourcetree.trustexitcode=true
remote.origin.fetch=+refs/heads/:refs/remotes/origin/
remote.origin.url=username@git.hidrive.strato.com:/users/username/git/repo.git
user.email=mail@username.de
user.name=User Name

=== Git Attributes Information ===
git check_attr --all output

=== Our Modified Files Newline Normalisation and EOL Information ===

0 Likes

#9

Does it help if you temporarily remove this setting?

0 Likes

#10

I removed the credential line in /Users/username/.gitconfig file and double checked the updated config with Debug Information.
But the result is the same.

0 Likes

#11

@wbond: Hm, I don’t use plink or peageant, I just installed Windows 10 and than Sublime Merge 1084 (log says C:\Program Files\Sublime Merge\Git\cmd\git.exe (bundled) and credential.helper=manager. Shouldn’t it work out of the box? When 1065 was released it asked me to enter my credentials and everything worked as expected. The update to 1070 broke it even though the entry still existed in Windows’ Credential Manager. The fresh installed 1084 never asked for my credentials and just fails with terminal prompts disabled. 1092 still has the problem.

0 Likes

#12

Same problem here on Windows 10 using the latest build: 1092.

Cloning a repo from bitbucket using Sublime Merge will not work, and will yield the exit code 128. This has worked perfectly up until not too long ago. Git client is the system one. Using powershell to clone works perfectly.

0 Likes

#13

I also tried the suggestion from @srbs, to set git_binary pref to system, but it didn’t work.

The same error is also addressed under the following link:

0 Likes

#14

Hi all,

This seems to stem from a known issue with the Git Credential Manager for Windows. This affects Git for Windows version 2.19.0, but is fixed as of version 2.19.1.

Try the following steps:

  1. Download and install the latest version of Git for Windows
  2. If this does not solve the issue, try updating Git for Windows Credential Manager.
    This can be downloaded here

Let me know if this solves the issue.

Kind regards,

Dylan Johnston
Software Engineer, Sublime HQ

1 Like

#15

The debug info for my default 1092 install says:

Using Git: C:\Program Files\Sublime Merge\Git\cmd\git.exe (bundled)
git version 2.19.1.windows.1

So a bug in 2.19.0 doesn’t seem to be the issue for me.

0 Likes

#16

Hi Dylan,

I upgraded my git (system) to version 2.19.2 on my macOS Mojave (10.14.1), but it’s still the same issue.

Thanks for helping
Daniel

0 Likes

#17

I’ve updated both on Windows Git:

$ git --version
git version 2.19.2.windows.1

problem still exists.

0 Likes

#18

1097 fixed the issue for me, thanks!

0 Likes

#19

Confirmed. The new version: 1097 fixed the issue for me as well.

0 Likes

#20

1097 didn’t fix the issue on macOS Mojave (10.14.1).

0 Likes