jenkinsci / jenkinsci/credentials-plugin

[JENKINS-71446] Document creation of Secret File or Secret Text credentials (plain-credentials) plugin via API

Open
#942 0 comments 0 reactions 0 assignees View on GitHub
component:credentials-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
134
Forks
258
Avg merge
48m
Merged PRs (30d)
1

Description

While reading https://github.com/jenkinsci/credentials-plugin/blob/master/docs/user.adoc#creating-a-credentials, I only found documentation of how to possibly create a username + password credentials, but no example of how to create a secret file or secret text credential.

Googling around, I found

https://www.linkedin.com/pulse/upload-jenkins-secret-file-credential-via-api-maksym-lushpenko/

Well, the author also seemed quite frustrated while looking for a solution. But the help of that blog post, I - at least - am able to create a secret file credential.

But updating it (using the path ...//update ) and passing it the same values does not work, although Jenkins is returning a 200 back.

Please properly document, how to create and update a credential of type secret file ( org.jenkinsci.plugins.plaincredentials.impl.FileCredentialsImpl ) and secret text ( org.jenkinsci.plugins.plaincredentials.impl.StringCredentialsImpl ) via the API

My attempts to resolve this via reverse engineering failed so far.

Thanks

pasche

---
Originally reported by pasche, imported from: Document creation of Secret File or Secret Text credentials (plain-credentials) plugin via API


  • status: Open
  • priority: Major
  • component(s): credentials-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-08

Contributor guide

Open the contributing guide

Research direction

Start with docs/user.adoc and its existing credential-creation section, then inspect the FileCredentialsImpl and StringCredentialsImpl credential types referenced in the issue. Document working API examples for creating and updating both secret file and secret text credentials, including the behavior that currently returns HTTP 200 without updating.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.