Skip to content

Fix Robot Account Login#590

Merged
bupd merged 2 commits into
goharbor:mainfrom
bupd:robot-acc-login
Jan 20, 2026
Merged

Fix Robot Account Login#590
bupd merged 2 commits into
goharbor:mainfrom
bupd:robot-acc-login

Conversation

@bupd

@bupd bupd commented Jan 9, 2026

Copy link
Copy Markdown
Member

Summary

Fixes #589

Robot accounts failed to login because GetCurrentUserInfo endpoint returns 412 for robot security context. Now detects this response and allows robot authentication to proceed.

Changes

  • Skip user validation error when 412 status detected (robot account)
  • test - Add robot account login test

Test

harbor login demo.goharbor.io -u robot_harbor-cli -p Harbor12345
# Login successful for robot_harbor-cli at https://demo.goharbor.io

@bupd bupd self-assigned this Jan 9, 2026
bupd added 2 commits January 10, 2026 01:46
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
@bupd bupd force-pushed the robot-acc-login branch from 96c7ead to 4342985 Compare January 9, 2026 20:16
@codecov

codecov Bot commented Jan 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 6.45%. Comparing base (60ad0bd) to head (4342985).
⚠️ Report is 71 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##             main    #590      +/-   ##
=========================================
- Coverage   10.99%   6.45%   -4.54%     
=========================================
  Files         173     260      +87     
  Lines        8671   12843    +4172     
=========================================
- Hits          953     829     -124     
- Misses       7612   11908    +4296     
  Partials      106     106              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@NucleoFusion NucleoFusion left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@bupd bupd merged commit 6af5f11 into goharbor:main Jan 20, 2026
8 of 9 checks passed
@bupd bupd deleted the robot-acc-login branch January 20, 2026 14:05
Vickysomtee pushed a commit to Vickysomtee/harbor-cli that referenced this pull request Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to login wth robot user on CLI

2 participants