{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls/comments/76219611","id":76219611,"diff_hunk":"@@ -1520,51 +1542,41 @@ private String quoteUnixCredentials(String str) {\n         return str.replace(\"'\", \"'\\\\''\");\n     }\n \n-    private File createWindowsSshAskpass(SSHUserPrivateKey sshUser) throws IOException {\n-        File ssh = File.createTempFile(\"pass\", \".bat\");\n-        try (PrintWriter w = new PrintWriter(ssh)) {\n-            w.println(\"echo \\\"\" + quoteWindowsCredentials(Secret.toString(sshUser.getPassphrase())) + \"\\\"\");\n-            w.flush();\n-        }\n-        ssh.setExecutable(true);\n+    private FilePath createWindowsSshAskpass(SSHUserPrivateKey sshUser) throws IOException, InterruptedException {\n+        FilePath ssh = workspace.createTextTempFile(\"pass\", \".bat\",","path":"src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java","position":444,"original_position":444,"commit_id":"2fe3d77b59241122a0ab4a8abc44e03f2d3b92f7","original_commit_id":"2fe3d77b59241122a0ab4a8abc44e03f2d3b92f7","user":{"login":"jtnord","id":494726,"avatar_url":"https://avatars.githubusercontent.com/u/494726?v=3","gravatar_id":"","url":"https://api.github.com/users/jtnord","html_url":"https://github.com/jtnord","followers_url":"https://api.github.com/users/jtnord/followers","following_url":"https://api.github.com/users/jtnord/following{/other_user}","gists_url":"https://api.github.com/users/jtnord/gists{/gist_id}","starred_url":"https://api.github.com/users/jtnord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtnord/subscriptions","organizations_url":"https://api.github.com/users/jtnord/orgs","repos_url":"https://api.github.com/users/jtnord/repos","events_url":"https://api.github.com/users/jtnord/events{/privacy}","received_events_url":"https://api.github.com/users/jtnord/received_events","type":"User","site_admin":false},"body":"this smells insecure.  use [`WorkspaceList.tmpDir(workspace)`](https://github.com/jenkinsci/jenkins/commit/307bfc17385c14aefcb623ccc3e7144e4f01e2a3)\r\n\r\nIf you can not bump a version to that write a helper that does the same thing.","created_at":"2016-08-25T10:37:27Z","updated_at":"2016-08-25T10:37:27Z","html_url":"https://github.com/jenkinsci/git-client-plugin/pull/212#discussion_r76219611","pull_request_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls/212","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls/comments/76219611"},"html":{"href":"https://github.com/jenkinsci/git-client-plugin/pull/212#discussion_r76219611"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls/212"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls/212","id":76433817,"html_url":"https://github.com/jenkinsci/git-client-plugin/pull/212","diff_url":"https://github.com/jenkinsci/git-client-plugin/pull/212.diff","patch_url":"https://github.com/jenkinsci/git-client-plugin/pull/212.patch","issue_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/issues/212","number":212,"state":"open","locked":false,"title":"let CliGitAPIImpl rely on FilePath+Launcher remote API","user":{"login":"ndeloof","id":132757,"avatar_url":"https://avatars.githubusercontent.com/u/132757?v=3","gravatar_id":"","url":"https://api.github.com/users/ndeloof","html_url":"https://github.com/ndeloof","followers_url":"https://api.github.com/users/ndeloof/followers","following_url":"https://api.github.com/users/ndeloof/following{/other_user}","gists_url":"https://api.github.com/users/ndeloof/gists{/gist_id}","starred_url":"https://api.github.com/users/ndeloof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndeloof/subscriptions","organizations_url":"https://api.github.com/users/ndeloof/orgs","repos_url":"https://api.github.com/users/ndeloof/repos","events_url":"https://api.github.com/users/ndeloof/events{/privacy}","received_events_url":"https://api.github.com/users/ndeloof/received_events","type":"User","site_admin":false},"body":"This (long) pull-request is about making CLIGitAPIImpl rely on FilePath and Launcher and have logic run on master JVM (as expected by the remoting abstraction). As JGitAPIImpl relies on JGit - so on java.io.File - it has to run fully remotely, so had to split logic between implementations.\r\n\r\nMost changes are about moving from File to FilePath and adding IOException to API methods.\r\n\r\nAlso removed getRepository that was deprecated since 1.1 as not being remotable.\r\n\r\nFinal goal is to let git-client rely on configured Launcher, which hold the computer environment or customized behavior from caller (using DecoratedLauncher)\r\nsee https://issues.jenkins-ci.org/browse/JENKINS-30600, also applies to git ran inside Pipeline as computer's NodeProperties are exposed to git by Launcher.","created_at":"2016-07-06T13:41:19Z","updated_at":"2016-08-25T10:37:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1fa07e032ae6439c4f597a8be1499dce129a0569","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls/212/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls/212/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/issues/212/comments","statuses_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/statuses/2fe3d77b59241122a0ab4a8abc44e03f2d3b92f7","head":{"label":"ndeloof:2.0.0-beta","ref":"2.0.0-beta","sha":"2fe3d77b59241122a0ab4a8abc44e03f2d3b92f7","user":{"login":"ndeloof","id":132757,"avatar_url":"https://avatars.githubusercontent.com/u/132757?v=3","gravatar_id":"","url":"https://api.github.com/users/ndeloof","html_url":"https://github.com/ndeloof","followers_url":"https://api.github.com/users/ndeloof/followers","following_url":"https://api.github.com/users/ndeloof/following{/other_user}","gists_url":"https://api.github.com/users/ndeloof/gists{/gist_id}","starred_url":"https://api.github.com/users/ndeloof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndeloof/subscriptions","organizations_url":"https://api.github.com/users/ndeloof/orgs","repos_url":"https://api.github.com/users/ndeloof/repos","events_url":"https://api.github.com/users/ndeloof/events{/privacy}","received_events_url":"https://api.github.com/users/ndeloof/received_events","type":"User","site_admin":false},"repo":{"id":13495428,"name":"git-client-plugin","full_name":"ndeloof/git-client-plugin","owner":{"login":"ndeloof","id":132757,"avatar_url":"https://avatars.githubusercontent.com/u/132757?v=3","gravatar_id":"","url":"https://api.github.com/users/ndeloof","html_url":"https://github.com/ndeloof","followers_url":"https://api.github.com/users/ndeloof/followers","following_url":"https://api.github.com/users/ndeloof/following{/other_user}","gists_url":"https://api.github.com/users/ndeloof/gists{/gist_id}","starred_url":"https://api.github.com/users/ndeloof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndeloof/subscriptions","organizations_url":"https://api.github.com/users/ndeloof/orgs","repos_url":"https://api.github.com/users/ndeloof/repos","events_url":"https://api.github.com/users/ndeloof/events{/privacy}","received_events_url":"https://api.github.com/users/ndeloof/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ndeloof/git-client-plugin","description":"","fork":true,"url":"https://api.github.com/repos/ndeloof/git-client-plugin","forks_url":"https://api.github.com/repos/ndeloof/git-client-plugin/forks","keys_url":"https://api.github.com/repos/ndeloof/git-client-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ndeloof/git-client-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ndeloof/git-client-plugin/teams","hooks_url":"https://api.github.com/repos/ndeloof/git-client-plugin/hooks","issue_events_url":"https://api.github.com/repos/ndeloof/git-client-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/ndeloof/git-client-plugin/events","assignees_url":"https://api.github.com/repos/ndeloof/git-client-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/ndeloof/git-client-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/ndeloof/git-client-plugin/tags","blobs_url":"https://api.github.com/repos/ndeloof/git-client-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ndeloof/git-client-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ndeloof/git-client-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/ndeloof/git-client-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ndeloof/git-client-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/ndeloof/git-client-plugin/languages","stargazers_url":"https://api.github.com/repos/ndeloof/git-client-plugin/stargazers","contributors_url":"https://api.github.com/repos/ndeloof/git-client-plugin/contributors","subscribers_url":"https://api.github.com/repos/ndeloof/git-client-plugin/subscribers","subscription_url":"https://api.github.com/repos/ndeloof/git-client-plugin/subscription","commits_url":"https://api.github.com/repos/ndeloof/git-client-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/ndeloof/git-client-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/ndeloof/git-client-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/ndeloof/git-client-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/ndeloof/git-client-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/ndeloof/git-client-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ndeloof/git-client-plugin/merges","archive_url":"https://api.github.com/repos/ndeloof/git-client-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ndeloof/git-client-plugin/downloads","issues_url":"https://api.github.com/repos/ndeloof/git-client-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/ndeloof/git-client-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/ndeloof/git-client-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/ndeloof/git-client-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ndeloof/git-client-plugin/labels{/name}","releases_url":"https://api.github.com/repos/ndeloof/git-client-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/ndeloof/git-client-plugin/deployments","created_at":"2013-10-11T09:49:50Z","updated_at":"2015-07-09T16:41:55Z","pushed_at":"2016-08-19T10:28:18Z","git_url":"git://github.com/ndeloof/git-client-plugin.git","ssh_url":"git@github.com:ndeloof/git-client-plugin.git","clone_url":"https://github.com/ndeloof/git-client-plugin.git","svn_url":"https://github.com/ndeloof/git-client-plugin","homepage":"","size":2546,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jenkinsci:2.0.0-beta","ref":"2.0.0-beta","sha":"5c6438e6d4819cc3a9727b96be561a774fefacb1","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":8263652,"name":"git-client-plugin","full_name":"jenkinsci/git-client-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/git-client-plugin","description":"Jenkins git client plugin","fork":false,"url":"https://api.github.com/repos/jenkinsci/git-client-plugin","forks_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/deployments","created_at":"2013-02-18T07:23:45Z","updated_at":"2016-08-23T20:28:05Z","pushed_at":"2016-08-21T04:23:15Z","git_url":"git://github.com/jenkinsci/git-client-plugin.git","ssh_url":"git@github.com:jenkinsci/git-client-plugin.git","clone_url":"https://github.com/jenkinsci/git-client-plugin.git","svn_url":"https://github.com/jenkinsci/git-client-plugin","homepage":"https://wiki.jenkins-ci.org/display/JENKINS/Git+Client+Plugin","size":7515,"stargazers_count":53,"watchers_count":53,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":184,"mirror_url":null,"open_issues_count":13,"forks":184,"open_issues":13,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls/212"},"html":{"href":"https://github.com/jenkinsci/git-client-plugin/pull/212"},"issue":{"href":"https://api.github.com/repos/jenkinsci/git-client-plugin/issues/212"},"comments":{"href":"https://api.github.com/repos/jenkinsci/git-client-plugin/issues/212/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls/212/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls/212/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/git-client-plugin/statuses/2fe3d77b59241122a0ab4a8abc44e03f2d3b92f7"}}}}
{"actor":{"display_login":"jtnord"}}