git ssh authentication failure

2 次查看(过去 30 天)
Matt Griffith
Matt Griffith 2019-7-25
Hello all,
I'm using a remote git repository hosted by Google Cloud Source Repositories. Git integration with Matlab is working for my local sandbox, however when I try to push I get the following error:
ssh://mgriffith%40ematrixenergy.com@source.developers.google.com:2022/p/ematrix/r/Software: Auth fail
I am able to push just fine from powershell and gitbash.
I followed the example in this thread to set things up.
When I run
git remote -v
I get the following output:
google ssh://mgriffith@ematrixenergy.com@source.developers.google.com:2022/p/ematrix/r/Software (fetch)
google ssh://mgriffith@ematrixenergy.com@source.developers.google.com:2022/p/ematrix/r/Software (push)
origin ssh://mgriffith@ematrixenergy.com@source.developers.google.com:2022/p/ematrix/r/Software (fetch)
origin ssh://mgriffith@ematrixenergy.com@source.developers.google.com:2022/p/ematrix/r/Software (push)
Notice how the first @ is replaced by %40 in the error message. Also when I try to use Matlab to set the remote url it will actually replace the @ with %40 in my ~\.git\config file
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[credential]
helper =
helper = !gcloud.cmd auth git-helper --account=mgriffith@ematrixenergy.com --ignore-unknown $@
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = ssh://mgriffith%40ematrixenergy.com@source.developers.google.com:2022/p/ematrix/r/Software
[branch "master"]
remote = origin
merge = refs/heads/master
[gui]
wmstate = zoomed
geometry = 543x401+30+30 392 255
[remote "google"]
url = ssh://mgriffith@ematrixenergy.com@source.developers.google.com:2022/p/ematrix/r/Software
fetch = +refs/heads/*:refs/remotes/google/*
I'm guessing that replacing the @ with %40 is the root of the problem, but I'm not sure. Any help would be greatly appcieated.
Thank you,
Matt

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Import and Analysis 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by