As mentioned in git-up/GitUp#35 the GitUp displays ambiguous error messages when there is an error related to ssh credentials. There may be many causes as @andreyz pointed out:
I think the diagnosis of this error is incorrect. ssh agent and up and running and keychain is unlocked. Gitup still refuses to do a remote push.
I managed to isolate at least one that allowed me to create a workaround for myself, however fixing the issue is beyond my current scope of skills.
I simply changed the origin url from: ssh://git-codecommit.amazonaws.com/myproject
to ssh://myusername@git-codecommit.amazonaws.com/myproject
And now magically I can interact with the remote.
The reason it worked in terminal is because the username is defined in my ssh config:
Host git-codecommit.*.amazonaws.com
User myusername
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/mykey
Now here's what my investigation revealed:
libgit2 detects there is no username and calls request_creds with GIT_CREDENTIAL_USERNAME as an auth method (Username-only authentication request, Used as a pre-authentication step if the underlying transport, (eg. SSH, with no username in its URL) does not know which username to use.)
The process ends up calling the _CredentialsCallback method in GCRepository.m but it does not know how to handle GIT_CREDENTIAL_USERNAME as it only supports: GIT_CREDENTIAL_SSH_KEY and GIT_CREDENTIAL_USERPASS_PLAINTEXT so it immediatelly returns error -30: "A user-configured callback refused to act "
As mentioned in git-up/GitUp#35 the GitUp displays ambiguous error messages when there is an error related to ssh credentials. There may be many causes as @andreyz pointed out:
Originally posted by @andreyz in https://github.com/git-up/GitUp/issues/35#issuecomment-239800880
I managed to isolate at least one that allowed me to create a workaround for myself, however fixing the issue is beyond my current scope of skills.
I simply changed the origin url from:
ssh://git-codecommit.amazonaws.com/myproject
tossh://myusername@git-codecommit.amazonaws.com/myproject
And now magically I can interact with the remote. The reason it worked in terminal is because the username is defined in my ssh config:Now here's what my investigation revealed:
request_creds
withGIT_CREDENTIAL_USERNAME
as an auth method (Username-only authentication request, Used as a pre-authentication step if the underlying transport, (eg. SSH, with no username in its URL) does not know which username to use.)_CredentialsCallback
method in GCRepository.m but it does not know how to handleGIT_CREDENTIAL_USERNAME
as it only supports:GIT_CREDENTIAL_SSH_KEY
andGIT_CREDENTIAL_USERPASS_PLAINTEXT
so it immediatelly returns error -30: "A user-configured callback refused to act "