Skip to content

Conversation

pavog
Copy link
Contributor

@pavog pavog commented May 23, 2022

When you use a sshkey for authentication, it will always use the user "git" if you choose ssh:// (instead of https://).
This pr changes this: It will use the username from the sshkey credentials.

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@lafriks lafriks added the bug label May 23, 2022
@pavog pavog requested a review from lafriks June 7, 2022 11:45
@lafriks lafriks merged commit 3507e21 into jenkinsci:master Jun 7, 2022
@pavog pavog deleted the sshkey-username branch June 7, 2022 14:04
@Piping
Copy link

Piping commented Dec 13, 2022

The feature has caused problems on gitea instance; The gitea instance expects the username to be fixed "git". @pavog @lafriks

@lafriks
Copy link
Contributor

lafriks commented Dec 13, 2022

But it should still use git if no username is set in ssh credentials secret

@Piping
Copy link

Piping commented Dec 13, 2022

@lafriks la Yes. But the jenkin configuration always provides a valid username; ssh://username@xxx does not work for ssh credentials with username; I am not sure why the behavior has changed. Is it due to gitea update?

@justusbunsi
Copy link
Member

@Piping Which Gitea plugin version do you use? 1.4.4 or 1.4.5?

@Piping
Copy link

Piping commented Dec 14, 2022

@justusbunsi I used 1.4.4; Now I downgrade the plugin to 1.4.3 for the work purpose;

@justusbunsi
Copy link
Member

@Piping For narrowing down the issue it would be really helpful if you could file an issue on Jenkins' JIRA with details on this: (Gitea plugin version for completeness), other related plugins and their versions, Gitea version, Jenkins version, Jenkins configuration Screenshots and error logs.

As @lafriks said this should be a non-breaking change.
I myself use ssh checkout with the Gitea plugin every day and am not facing the issue. So it would be great to have your details to find the differences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants