Get a single SSH Key.

<pre><code>GitLab Endpoint: GET /user/keys/:key_id</code></pre>

@param keyId the ID of the SSH key.
@return an SshKey instance holding the info on the SSH key specified by keyId
@throws GitLabApiException if any exception occurs
194825
public SshKey getSshKey(Integer keyId) throws GitLabApiException {
        Response response = get(Response.Status.OK, null, "user", "keys", keyId);
        return (response.readEntity(SshKey.class));
    }
810276
@SuppressWarnings("unchecked")
    public ApiKey getApiKey(final String key) {
        final Query query = pm.newQuery(ApiKey.class, "key == :key");
        final List<ApiKey> result = (List<ApiKey>) query.execute(key);
        return Collections.isEmpty(result) ? null : result.get(0);
    }
1357223
public static PrivateKey getPrivateKey(KeyStore keyStore, String alias, String keyPass)
      throws GeneralSecurityException {
    return (PrivateKey) keyStore.getKey(alias, keyPass.toCharArray());
  }
170952
def _get_keyid(keytype, scheme, key_value, hash_algorithm = 'sha256'):
  """"""

  # 'keyid' will be generated from an object conformant to KEY_SCHEMA,
  # which is the format Metadata files (e.g., root.json) store keys.
  # 'format_keyval_to_metadata()' returns the object needed by _get_keyid().
  key_meta = format_keyval_to_metadata(keytype, scheme, key_value, private=False)

  # Convert the key to JSON Canonical format, suitable for adding
  # to digest objects.
  key_update_data = securesystemslib.formats.encode_canonical(key_meta)

  # Create a digest object and call update(), using the JSON
  # canonical format of 'rskey_meta' as the update data.
  digest_object = securesystemslib.hash.digest(hash_algorithm)
  digest_object.update(key_update_data.encode('utf-8'))

  # 'keyid' becomes the hexadecimal representation of the hash.
  keyid = digest_object.hexdigest()

  return keyid
164116
public function sshKey($site, $keyId)
    {
        $variables = array(
            'site' => $site,
            'id' => $keyId,
        );
        $request = $this->get(array('{+base_path}/sites/{site}/sshkeys/{id}.json', $variables));
        return new Response\SshKey($request);
    }
835070
public void deleteSSHKey(Integer targetUserId, Integer targetKeyId) throws IOException {
        String tailUrl = GitlabUser.USERS_URL + "/" + targetUserId + GitlabSSHKey.KEYS_URL + "/" + targetKeyId;
        retrieve().method(DELETE).to(tailUrl, Void.class);
    }
556431
public OvhSshKeyDetail project_serviceName_sshkey_keyId_GET(String serviceName, String keyId) throws IOException {
		String qPath = "/cloud/project/{serviceName}/sshkey/{keyId}";
		StringBuilder sb = path(qPath, serviceName, keyId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhSshKeyDetail.class);
	}
1154345
public PullResult pullFromRepository(Git git, String remote, String remoteBranch, String username, String password) {
        try {
            return git.pull()
                .setRemote(remote)
                .setRemoteBranchName(remoteBranch)
                .setCredentialsProvider(new UsernamePasswordCredentialsProvider(username, password))
                .call();
        } catch (GitAPIException e) {
            throw new IllegalStateException(e);
        }
    }
686064
public GitkitUser getUserByLocalId(String localId)
      throws GitkitClientException, GitkitServerException {
    Preconditions.checkNotNull(localId);
    try {
      JSONObject result = rpcHelper.getAccountInfoById(localId);
      return jsonToUser(result.getJSONArray("users").getJSONObject(0));
    } catch (JSONException e) {
      throw new GitkitServerException(e);
    }
  }
1297612
public static sslfipskey get(nitro_service service, String fipskeyname) throws Exception{
		sslfipskey obj = new sslfipskey();
		obj.set_fipskeyname(fipskeyname);
		sslfipskey response = (sslfipskey) obj.get_resource(service);
		return response;
	}
257993
public List<GitlabSSHKey> getSSHKeys(Integer targetUserId) throws IOException {
        String tailUrl = GitlabUser.USERS_URL + "/" + targetUserId + GitlabSSHKey.KEYS_URL;
        return Arrays.asList(retrieve().to(tailUrl, GitlabSSHKey[].class));
    }
28880
function get_key($keyid)
    {
        $this->load_pgp_driver();
        $result = $this->pgp_driver->get_key($keyid);

        if ($result instanceof enigma_error) {
            self::raise_error($result, __LINE__);
        }

        return $result;
    }
1236097
public GitlabProject getProject(Serializable projectId) throws IOException {
        String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(projectId);
        return retrieve().to(tailUrl, GitlabProject.class);
    }
623935
public static sslcertkey[] get(nitro_service service, String certkey[]) throws Exception{
		if (certkey !=null && certkey.length>0) {
			sslcertkey response[] = new sslcertkey[certkey.length];
			sslcertkey obj[] = new sslcertkey[certkey.length];
			for (int i=0;i<certkey.length;i++) {
				obj[i] = new sslcertkey();
				obj[i].set_certkey(certkey[i]);
				response[i] = (sslcertkey) obj[i].get_resource(service);
			}
			return response;
		}
		return null;
	}
180287
def get(self, key_id=None):
        
        url = self.bitbucket.url('GET_SSH_KEY', key_id=key_id)
        return self.bitbucket.dispatch('GET', url, auth=self.bitbucket.auth)
123518
public List<SshKey> getSshKeys() throws GitLabApiException {
        Response response = get(Response.Status.OK, getDefaultPerPageParam(), "user", "keys");
        return (response.readEntity(new GenericType<List<SshKey>>() {}));
    }
26248
def get_key(key, host=None, port=None, db=None, password=None):
    '''
    
    '''
    server = _connect(host, port, db, password)
    return server.get(key)