git-credential-manager icon indicating copy to clipboard operation
git-credential-manager copied to clipboard

"git-credential-manager github list" shows only the first logged in account

Open PingvinB opened this issue 2 months ago • 3 comments

How to reproduce:

  • Log in with account 1: git-credential-manager github login
  • List accounts: git-credential-manager github list
  • See account 1 listed
  • Log in with account 2: git-credential-manager github login
  • List accounts again: git-credential-manager github list
  • See only account 1 listed still
  • Log out from account 1: git-credential-manager github logout account1
  • List accounts again: git-credential-manager github list
  • See account 2 listed now

git-credential-manager --version: 2.6.1+786ab03440ddc82e807a97c0e540f5247e44cec6

OS: Fedora Linux 43 (KDE Plasma Desktop Edition) x86_64

PingvinB avatar Nov 16 '25 18:11 PingvinB

Hello @PingvinB, it would really help us if you could share also your git-credential-manager diagnose output file here. Please just make sure to remove all personal and sensitive information, as the output log file contains those.

xfabo1 avatar Dec 01 '25 12:12 xfabo1

I am trying, but..

> git-credential-manager diagnose
Running diagnostics...

 [ OK ] Environment
 [ OK ] File system
 [ OK ] Networking
  >>>>  GitUnhandled e[ OK ] Git
  >>>>  Credential storageSystem.Threading.Tasks.TaskCanceledException: The operation was canceled.
 ---> System.IO.IOException: Unable to read data from the transport connection: Operation canceled.
 ---> System.Net.Sockets.SocketException (125): Operation canceled
   --- End of inner exception stack trace ---
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
   at System.Net.Http.HttpConnection.InitialFillAsync(Boolean async)
   at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at GitCredentialManager.Diagnostics.NetworkingDiagnostic.SendHttpRequest(StringBuilder log, HttpClient httpClient)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
Aborted                    (core dumped) git-credential-manager diagnose

PingvinB avatar Dec 05 '25 12:12 PingvinB

Oh. It looks like the file got generated anyway.

Diagnose log at 2025-12-05T12:29:16Z

AppPath: /home/myusername/.dotnet/tools/git-credential-manager
InstallDir: /home/myusername/.dotnet/tools/.store/git-credential-manager/2.6.1/git-credential-manager/2.6.1/tools/net8.0/any/
Version: 2.6.1+786ab03440ddc82e807a97c0e540f5247e44cec6

------------
Diagnostic: Environment
Skipped: False
Success: True
Exception: None
Log:
OSType: Linux
OSVersion: Fedora Linux 43 (KDE Plasma Desktop Edition)
Reading environment variables... OK
 Variables:
KDE_FULL_SESSION=true
GDK_CORE_DEVICE_EVENTS=1
DEBUGINFOD_URLS=ima:enforcing https://debuginfod.fedoraproject.org/ ima:ignore 
DOTNET_BUNDLE_EXTRACT_BASE_DIR=/home/myusername/.cache/dotnet_bundle_extract
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1
HOME=/home/myusername
ICEAUTHORITY=/run/user/1000/iceauth_bLCESg
LC_NAME=C
XDG_SESSION_ID=2
HISTSIZE=1000
SSH_AUTH_SOCK=/run/user/1000/ssh-agent.socket
_JAVA_AWT_WM_NONREPARENTING=1
LESSOPEN=||/usr/bin/lesspipe.sh %s
KDE_APPLICATIONS_AS_SCOPE=1
XDG_DATA_HOME=/home/myusername/.local/share
LANGUAGE=
KONSOLE_DBUS_SERVICE=:1.123
KGLOBALACCELD_PLATFORM=org.kde.kwin
KONSOLE_VERSION=250803
LC_PAPER=C
COLORFGBG=15;0
XKB_DEFAULT_LAYOUT=us
LC_NUMERIC=en_DK.UTF-8
QT_WAYLAND_RECONNECT=1
LC_ADDRESS=C
IMSETTINGS_INTEGRATE_DESKTOP=yes
WAYLAND_DISPLAY=wayland-0
_=/home/myusername/.dotnet/tools/git-credential-manager
HISTCONTROL=ignoredups
XKB_DEFAULT_MODEL=pc105
SHLVL=1
XDG_STATE_HOME=/home/myusername/.local/state
MAIL=/var/spool/mail/myusername
LC_TIME=en_DK.UTF-8
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/myusername/.gtkrc-2.0:/home/myusername/.config/gtkrc-2.0
XDG_MENU_PREFIX=plasma-
KONSOLE_DBUS_SESSION=/Sessions/1
DOTNET_ROOT=/usr/lib64/dotnet
XDG_CONFIG_DIRS=/home/myusername/.config/kdedefaults:/etc/xdg:/usr/share/kde-settings/kde-profile/default/xdg
XAUTHORITY=/run/user/1000/xauth_pdvevc
KDE_SESSION_UID=1000
KDE_SESSION_VERSION=6
DEBUGINFOD_IMA_CERT_PATH=/etc/keys/ima:
GIT_TRACE2_PARENT_SID=2cad9e0d-efc1-42b4-aef0-e86e2ab89d88
LC_MONETARY=C
LC_MEASUREMENT=C
XDG_CURRENT_DESKTOP=KDE
IMSETTINGS_MODULE=none
WINDOWID=94901635755856
INVOCATION_ID=d3b3889cdb334c0fb265be5e1771e933
XDG_SESSION_DESKTOP=KDE
COLORTERM=truecolor
XDG_SEAT=seat0
LC_TELEPHONE=C
SYSTEMD_EXEC_PID=5102
PWD=/home/myusername
XDG_CONFIG_HOME=/home/myusername/.config
MOZ_GMP_PATH=/usr/lib64/mozilla/plugins/gmp-gmpopenh264/system-installed
MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/plasma-kwin_wayland.service/memory.pressure
KDEDIRS=/usr
SHELL_SESSION_ID=6228204806d648819f26430c366a758e
VISUAL=vim
MANAGERPID=4591
EDITOR=vim
HOSTNAME=fedora
MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA=
PROFILEHOME=
DISPLAY=:0
XMODIFIERS=@im=none
SSH_ASKPASS=/usr/bin/ksshaskpass
JOURNAL_STREAM=9:49625
GPG_TTY=/dev/tty2
XDG_DATA_DIRS=/home/myusername/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
PATH=/home/myusername/.local/bin:/home/myusername/.cargo/bin:/home/myusername/.volta/bin:/home/myusername/.dotnet/tools:/home/myusername/.local/bin:/home/myusername/.cargo/bin:/home/myusername/.volta/bin:/home/myusername/.dotnet/tools:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/myusername/.dotnet/tools:/home/myusername/.local/share/JetBrains/Toolbox/scripts
LANG=en_US.UTF-8
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
LOGNAME=myusername
XDG_RUNTIME_DIR=/run/user/1000
KONSOLE_DBUS_WINDOW=/Windows/1
TERM=xterm-256color
XDG_CACHE_HOME=/home/myusername/.cache
SHELL=/bin/bash
DESKTOP_SESSION=plasma
STARSHIP_SHELL=bash
GTK_RC_FILES=/etc/gtk/gtkrc:/home/myusername/.gtkrc:/home/myusername/.config/gtkrc
PAM_KWALLET5_LOGIN=/run/user/1000/kwallet5.socket
XDG_SESSION_CLASS=user
USER=myusername
LS_COLORS=
XDG_VTNR=2
SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/5704,unix/unix:/tmp/.ICE-unix/5704
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
XDG_SESSION_TYPE=wayland
MANAGERPIDFDID=4592
STARSHIP_SESSION_KEY=2214755320992063


------------
Diagnostic: File system
Skipped: False
Success: True
Exception: None
Log:
Temporary directory is '/tmp/'...
Checking basic file I/O...
Writing to temporary file '/tmp/58144e259c1efc4b457f607e'... OK
Reading from temporary file '/tmp/58144e259c1efc4b457f607e'... OK
Deleting temporary file '/tmp/58144e259c1efc4b457f607e'... OK
Testing IFileSystem instance...
UserHomePath: /home/myusername
UserDataDirectoryPath: /home/myusername/.gcm
GetCurrentDirectory(): /home/myusername

------------
Diagnostic: Networking
Skipped: False
Success: True
Exception: None
Log:
Checking networking and HTTP stack...
Creating HTTP client... OK
IsNetworkAvailable: True
Sending HEAD request to http://example.com...Sending HEAD request to https://example.com... OK
Acquiring free TCP port... OK
Testing local HTTP loopback connections...
Creating new HTTP listener for http://localhost:46727/... OK
Waiting for loopback connection... OK
Writing response... OK
Waiting for response data... OK
Loopback connection data OK

------------
Diagnostic: Git
Skipped: False
Success: True
Exception: None
Log:
Getting Git version... OK
Git version is '2.51.1'
Locating current repository...Not inside a Git repository.
 OK
Listing all Git configuration... OK
Git configuration:
file:/home/myusername/.gitconfig	user.name=myusername
file:/home/myusername/.gitconfig	[email protected]
file:/home/myusername/.gitconfig	alias.sm=submodule
file:/home/myusername/.gitconfig	alias.wt=worktree
file:/home/myusername/.gitconfig	alias.pushf=push --force-with-lease --force-if-includes
file:/home/myusername/.gitconfig	alias.syncmain=!git fetch origin && git rebase --autosquash origin/main
file:/home/myusername/.gitconfig	alias.syncfrom=!git fetch origin && git rebase --autosquash origin/$1 #
file:/home/myusername/.gitconfig	alias.fixlast=!git commit --amend --no-edit
file:/home/myusername/.gitconfig	alias.undolast=reset --soft HEAD~1
file:/home/myusername/.gitconfig	alias.squashlocal=rebase origin --autosquash
file:/home/myusername/.gitconfig	alias.changelog=log --reverse --format='- %s%n%w(72,2)%b%-C()' origin/main..HEAD
file:/home/myusername/.gitconfig	alias.changelogfrom=!git log --reverse --format='- %s%n%w(72,2)%b%-C()' origin/$1..HEAD
file:/home/myusername/.gitconfig	alias.logp=log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
file:/home/myusername/.gitconfig	alias.default-branch=!git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'
file:/home/myusername/.gitconfig	alias.merge-base-origin=!f() { git merge-base ${1-HEAD} origin/$(git default-branch); };f 
file:/home/myusername/.gitconfig	alias.merge-base-origin-dev=!f() { git merge-base ${1-HEAD} origin/develop; };f 
file:/home/myusername/.gitconfig	alias.stack=!f() { BRANCH=${1-HEAD}; MERGE_BASE=$(git merge-base-origin $BRANCH); git log --decorate-refs=refs/heads --simplify-by-decoration --pretty=format:'%(decorate:prefix=,suffix=,tag=,separator=%n)' $MERGE_BASE..$BRANCH; };f 
file:/home/myusername/.gitconfig	alias.stack-dev=!f() { BRANCH=${1-HEAD}; MERGE_BASE=$(git merge-base-origin-dev $BRANCH); git log --decorate-refs=refs/heads --simplify-by-decoration --pretty=format:'%(decorate:prefix=,suffix=,tag=,separator=%n)' $MERGE_BASE..$BRANCH; };f 
file:/home/myusername/.gitconfig	alias.push-stack=!f() { BRANCH=${1-HEAD};  git stack $BRANCH | xargs -I {} git pushf origin {}; };f 
file:/home/myusername/.gitconfig	alias.push-stack-dev=!f() { BRANCH=${1-HEAD};  git stack-dev $BRANCH | xargs -I {} git pushf origin {}; };f 
file:/home/myusername/.gitconfig	branch.sort=-committerdate
file:/home/myusername/.gitconfig	core.autocrlf=false
file:/home/myusername/.gitconfig	diff.algorithm=histogram
file:/home/myusername/.gitconfig	diff.colormoved=plain
file:/home/myusername/.gitconfig	diff.mnemonicprefix=true
file:/home/myusername/.gitconfig	diff.renames=true
file:/home/myusername/.gitconfig	fetch.prune=true
file:/home/myusername/.gitconfig	fetch.prunetags=true
file:/home/myusername/.gitconfig	help.autocorrect=prompt
file:/home/myusername/.gitconfig	init.defaultbranch=main
file:/home/myusername/.gitconfig	log.date=iso-local
file:/home/myusername/.gitconfig	merge.conflictstyle=zdiff3
file:/home/myusername/.gitconfig	pull.rebase=true
file:/home/myusername/.gitconfig	push.default=simple
file:/home/myusername/.gitconfig	push.autosetupremote=true
file:/home/myusername/.gitconfig	push.followtags=true
file:/home/myusername/.gitconfig	rebase.autosquash=true
file:/home/myusername/.gitconfig	rebase.autostash=true
file:/home/myusername/.gitconfig	rebase.updaterefs=true
file:/home/myusername/.gitconfig	rebase.missingcommitscheck=error
file:/home/myusername/.gitconfig	rerere.enabled=true
file:/home/myusername/.gitconfig	rerere.autoupdate=true
file:/home/myusername/.gitconfig	tag.sort=version:refname
file:/home/myusername/.gitconfig	absorb.maxstack=50
file:/home/myusername/.gitconfig	absorb.onefixuppercommit=true
file:/home/myusername/.gitconfig	credential.credentialstore=secretservice
file:/home/myusername/.gitconfig	credential.helper=
file:/home/myusername/.gitconfig	credential.helper=/home/myusername/.dotnet/tools/git-credential-manager
file:/home/myusername/.gitconfig	credential.https://dev.azure.com.usehttppath=true

PingvinB avatar Dec 05 '25 12:12 PingvinB

Hello @PingvinB, I have tried to replicate the issue and in my case it seemed like we only shown one account (the first one logged in). I did not end up with the state where I had two accounts listed. I have tested the same solution on Windows and it worked as expected. I will verify further, thank you for reporting the issue.

xfabo1 avatar Dec 12 '25 11:12 xfabo1