{"thread":{"id":"45597","subject":"How do you script linux GIT client to pass kerberos credential to apache enabled GIT server?","startedAt":"2017-04-03T16:04:49Z","lastAt":"2017-04-04T10:13:25Z","messageCount":3,"participants":["ken edward","Randall S. Becker","Mantas Mikulėnas"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"316093","messageId":"CAAqgmoP2uyd5_k-JDOBpBV8ay6BueUvKkwcWAZ_C1n4=4xpECg@mail.gmail.com","threadId":"45597","inReplyTo":null,"subject":"How do you script linux GIT client to pass kerberos credential to apache enabled GIT server?","fromName":"ken edward","fromEmail":"kedward777@gmail.com","sentAt":"2017-04-03T16:04:29Z","receivedAt":"2017-04-03T16:04:49Z","isPatch":false,"sender":{"key":"kedward777@gmail.com","avatar":null},"body":"Hello,\n\nI have my git repositories behind an apache server configured with\nkerberos. Works fine if the user is logged in on their workstation.\nApache gets the kerberos credential, and validates, and  then sends\nthe GIT repo being requested.\n\nBUT, I want to write a script on linux that will also pass the\nkerberos credential to the apache GIT server without having any\nmanually intervention. Seems I would create a kerberos keytab for the\nprincipal and then use that to authenticate.... kinit supports\nauthenticating from a keytab using the -k -t <keytab-path> options,\nbut has anyone done this?\n\nKeith\n"},{"id":"316094","messageId":"002501d2ac96$42a272a0$c7e757e0$@nexbridge.com","threadId":"45597","inReplyTo":"CAAqgmoP2uyd5_k-JDOBpBV8ay6BueUvKkwcWAZ_C1n4=4xpECg@mail.gmail.com","subject":"RE: How do you script linux GIT client to pass kerberos credential to apache enabled GIT server?","fromName":"Randall S. Becker","fromEmail":"rsbecker@nexbridge.com","sentAt":"2017-04-03T16:20:45Z","receivedAt":"2017-04-03T16:21:06Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"-----Original Message-----\nOn April 3, 2017 12:04 PM, Ken Edward Wrote:\n>I have my git repositories behind an apache server configured with kerberos. Works fine if the user is logged in on their workstation.\n>Apache gets the kerberos credential, and validates, and  then sends the GIT repo being requested.\n>BUT, I want to write a script on linux that will also pass the kerberos credential to the apache GIT server without having any manually intervention. Seems I would create a kerberos keytab for the principal and then use that to >authenticate.... kinit supports authenticating from a keytab using the -k -t <keytab-path> options, but has anyone done this?\n\nHave you attempted prototyping this using curl? It might be able to help out a bit. I have done this in the past with Stash and their REST and credentials, but not using Kerberos. Just a thought.\nCheers,\n\nRandall\n\n"},{"id":"316143","messageId":"7ab9e033-906f-f1ec-f89a-952346e98651@gmail.com","threadId":"45597","inReplyTo":"CAAqgmoP2uyd5_k-JDOBpBV8ay6BueUvKkwcWAZ_C1n4=4xpECg@mail.gmail.com","subject":"Re: How do you script linux GIT client to pass kerberos credential to apache enabled GIT server?","fromName":"Mantas Mikulėnas","fromEmail":"grawity@gmail.com","sentAt":"2017-04-04T10:12:38Z","receivedAt":"2017-04-04T10:13:25Z","isPatch":false,"sender":{"key":"grawity@gmail.com","avatar":"https://avatars.githubusercontent.com/u/31021?v=4"},"body":"On 2017-04-03 19:04, ken edward wrote:\n> Hello,\n> \n> I have my git repositories behind an apache server configured with\n> kerberos. Works fine if the user is logged in on their workstation.\n> Apache gets the kerberos credential, and validates, and  then sends\n> the GIT repo being requested.\n> \n> BUT, I want to write a script on linux that will also pass the\n> kerberos credential to the apache GIT server without having any\n> manually intervention. Seems I would create a kerberos keytab for the\n> principal and then use that to authenticate.... kinit supports\n> authenticating from a keytab using the -k -t <keytab-path> options,\n\nkinit works, but I think kstart [1] is commonly used for this as well;\ntakes care of automatic ticket renewal.\n\nktutil should be able to create a keytab based on your password, but\nI've had mixed luck with that. Though still probably easier than\ncreating a separate instance just for batch tasks...\n\n[1]: https://www.eyrie.org/~eagle/software/kstart/\n\n-- \nMantas Mikulėnas <grawity@gmail.com>\n"}]}