J'essaie d'utiliser AWS CodeCommit pour mes repos. Pour ceux qui ne le savent pas, CC requiert une aide d'identification git spécifique pour générer le mot de passe pour les demandes HTTPS, car il est crypté et basé sur le temps. Cela fonctionne normalement. Cependant, j'ai un problème aggravant: git semble automatiquement mettre en cache mes informations d'identification sensibles au temps dans Keychain, ce qui signifie qu'après environ 15 minutes, j'obtiendra seulement 403 erreurs de pousser ou de récupérer.Puis-je remplacer git-credential-osxkeychain sur OS X Yosemite?
J'ai essayé de suivre the instructions here, mais je n'ai pas osxkeychain
configuré n'importe où. Aussi près que je peux dire, il est codé en dur dans Apple git.
Voici une paire de traces de git
montrant le problème:
Intial chercher
MikeBook-Pro:sensei-cli mike$ GIT_TRACE=1 git fetch 13:43:19.583664 git.c:348 trace: built-in: git 'fetch' 13:43:19.584764 run-command.c:347 trace: run_command: 'git-remote-https' 'origin' 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/sensei-cli' 13:43:20.024288 run-command.c:347 trace: run_command: 'git credential-osxkeychain get' 13:43:20.025203 run-command.c:195 trace: exec: '/bin/sh' '-c' 'git credential-osxkeychain get' 'git credential-osxkeychain get' 13:43:20.029429 git.c:557 trace: exec: 'git-credential-osxkeychain' 'get' # This last command returns nothing, as nothing is in Keychain. 13:43:20.029928 run-command.c:347 trace: run_command: 'git-credential-osxkeychain' 'get' 13:43:21.016738 run-command.c:347 trace: run_command: 'aws --profile default codecommit credential-helper [email protected] get' # This returns the correct generated credentials 13:43:21.018020 run-command.c:195 trace: exec: '/bin/sh' '-c' 'aws --profile default codecommit credential-helper [email protected] get' 'aws --profile default codecommit credential-helper [email protected] get' 13:43:21.985711 run-command.c:347 trace: run_command: 'git credential-osxkeychain store' # This stores the credentials in Keychain 13:43:21.986731 run-command.c:195 trace: exec: '/bin/sh' '-c' 'git credential-osxkeychain store' 'git credential-osxkeychain store' 13:43:21.991811 git.c:557 trace: exec: 'git-credential-osxkeychain' 'store' 13:43:21.992266 run-command.c:347 trace: run_command: 'git-credential-osxkeychain' 'store'13:43:22.017201 run-command.c:347 trace: run_command: 'aws --profile default codecommit credential-helper [email protected] store' 13:43:22.017897 run-command.c:195 trace: exec: '/bin/sh' '-c' 'aws --profile default codecommit credential-helper [email protected] store' 'aws --profile default codecommit credential-helper [email protected] store' 13:43:22.302123 run-command.c:347 trace: run_command: 'rev-list' '--objects' '--stdin' '--not' '--all' '--quiet' ...
Après chercher
MikeBook-Pro:sensei-cli mike$ GIT_TRACE=1 git fetch 13:53:51.224971 git.c:348 trace: built-in: git 'fetch' 13:53:51.231140 run-command.c:347 trace: run_command: 'git-remote-https' 'origin' 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/sensei-cli' 13:53:53.855917 run-command.c:347 trace: run_command: 'git credential-osxkeychain get' 13:53:53.859291 run-command.c:195 trace: exec: '/bin/sh' '-c' 'git credential-osxkeychain get' 'git credential-osxkeychain get' 13:53:53.876895 git.c:557 trace: exec: 'git-credential-osxkeychain' 'get' # This DOES return credentials, so it doesn't try any helpers 13:53:53.877419 run-command.c:347 trace: run_command: 'git-credential-osxkeychain' 'get' fatal: unable to access 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/sensei-cli/': The requested URL returned error: 403
git --version
et git config -l
sortie
MikeBook-Pro:sensei-cli mike$ git --version git version 2.4.9 (Apple Git-60)
MikeBook-Pro:sensei-cli mike$ git config -l user.name=Mike Caron [email protected] credential.helper=!aws --profile default codecommit credential-helper [email protected] credential.usehttppath=true core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true core.ignorecase=true core.precomposeunicode=true remote.origin.url=https://git-codecommit.us-east-1.amazonaws.com/v1/repos/sensei-cli remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* branch.master.remote=origin branch.master.merge=refs/heads/master
(J'espère que quelqu'un d'autre a une solution de contournement intelligente, mais certainement pas.) –
Savez-vous comment afficher ce bogue? J'ai essayé d'aller sur https://bugreport.apple.com et de le chercher, mais je n'ai pas réussi à le remonter. De toute façon, il semble que la seule solution pourrait être d'installer une autre version de git :( –
Je pense que vous ne pouvez voir que les bugs radar * que vous avez * déposés, ils ne sont pas tellement avec de la transparence –