On Tue, Oct 4, 2011 at 3:10 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote: > > Hmm, don't we first want to enumerate contexts where we might want to get > the access information from the user? E.g. > > * "transport" aka "git fetch/push"; I think you meant this by --type=network, > but there probably are other kinds of accesses over "network". > * "imap-send". > * "send-email". > * "tag -s" and perhaps upcoming "push --signed" or "commit --gpg-sign"? > > Anything else? Perhaps it would be illustrative to look at the OS X keychain API call for adding a password to the store: OSStatus SecKeychainAddInternetPassword ( SecKeychainRef keychain, UInt32 serverNameLength, const char *serverName, UInt32 securityDomainLength, const char *securityDomain, UInt32 accountNameLength, const char *accountName, UInt32 pathLength, const char *path, UInt16 port, SecProtocolType protocol, SecAuthenticationType authenticationType, UInt32 passwordLength, const void *passwordData, SecKeychainItemRef *itemRef ); SecProtocolType is an enum of 4-char values such as 'ftp ', 'http', etc. Similarly for SecAuthenticationType which uses values such as 'form' (web form), 'http' (basic auth), etc. http://developer.apple.com/library/mac/#documentation/Security/Reference/keychainservices/Reference/reference.html#//apple_ref/doc/c_ref/SecKeychainAddInternetPassword http://developer.apple.com/library/mac/#documentation/Security/Reference/keychainservices/Reference/reference.html#//apple_ref/doc/c_ref/SecProtocolType http://developer.apple.com/library/mac/#documentation/Security/Reference/keychainservices/Reference/reference.html#//apple_ref/doc/c_ref/SecAuthenticationType j. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html