From how these APIs are used currently, it seems like a block-based API would be more foolproof.

[GTRepository cachCredentials... withBlock:^{
    // do stuff with them
}];