public GitHubDeployKey addDeployKey(final String owner, final String repo, final String title, final String key) { Map<String, Object> uriVariables = new HashMap<>(); uriVariables.put("user", owner); uriVariables.put("repo", repo); AddDeployKeyRequest request = new AddDeployKeyRequest(title, key); return getRestTemplate().postForObject(buildRepoUri("/keys", uriVariables), request, GitHubDeployKey.class); }