I agree, just don't want to solve 3 problems at once, IMHO these should all be internal:

```
typedef struct git_cred_ssh_key
typedef struct git_cred_ssh_interactive
typedef struct git_cred_ssh_custom
```

These structured are filled in by their constructors. I don't see a use case for querying them after construction.

Actually these should probably also be opaque:

```
/** Authentication type requested */
typedef enum {
	/* git_cred_userpass_plaintext */
	GIT_CREDTYPE_USERPASS_PLAINTEXT = (1u << 0),

	/* git_cred_ssh_key */
	GIT_CREDTYPE_SSH_KEY = (1u << 1),

	/* git_cred_ssh_custom */
	GIT_CREDTYPE_SSH_CUSTOM = (1u << 2),

	/* git_cred_default */
	GIT_CREDTYPE_DEFAULT = (1u << 3),

	/* git_cred_ssh_interactive */
	GIT_CREDTYPE_SSH_INTERACTIVE = (1u << 4),
} git_credtype_t;

/* The base structure for all credential types */
typedef struct git_cred git_cred;

struct git_cred {
	git_credtype_t credtype;
	void (*free)(git_cred *cred);
};
```

Unless there is a specific reason why we would want their internals to be known.