Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do i make a GIT credential helper?
    primarykey
    data
    text
    <p><strong>The original question has been edited for clarity:</strong></p> <p>I have a main project that does a <code>git clone https://my.repo.project.git</code>. The project has 2 targets (main target and password helper target). The repository is password protected and will ask for username, followed by a password. The main app calls the git command via the <code>NSTask</code> object.</p> <pre><code>NSDictionary *environmentDict = [[NSProcessInfo processInfo] environment]; [task setLaunchPath:gitExecutableLaunchPath]; [task setArguments:[NSArray arrayWithObjects:@"clone", @"https://my.repo.project.git"]; [task setCurrentDirectoryPath:path]; [task setEnvironment:environmentDict]; </code></pre> <p>I have followed the concept from <a href="https://bitbucket.org/iracooke/ssh-nstask/src/" rel="nofollow">this project</a> to enable my password helper target to run automatically when the main target does not have the git credentials stored in the keychain for the repo. All this secondary password helper target does is the following code (for simplicity):</p> <pre><code>int main (int argc, const char * argv[]) { @autoreleasepool { NSLog(@"Password helper has been launched"); char *username = "my_username"; char *password = "my_password"; printf("%s\n", username); printf("%s\n", password); } return 0; </code></pre> <p>I can see in the logs that the password helper app has been launched, but i always get an "Authentication Failed message". Any idea what i am doing wrong? My goal is to develop a credential helper App much like git's git-credential-osxkeychain app. Any help is much appreciated</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload