From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: alexis purslane via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#71200: TRAMP: Trying to do a project-find-file or (find-directory) using the podman method causes a (wrong-type-argument stringp nil) error Date: Mon, 27 May 2024 02:06:52 +0000 Message-ID: <1Lz1FIPZ1KHsruvlYqA1e5561TOSEoJ1M1r-72pI7BuICHbq72ohFmG9Kz1ltdW-AQeedGM_3PV9ef7r9CQ3iyQzkztUeaux0PhdZdFNmcw=@pm.me> References: <_cjSz3e_d7dB-G6yi32s-DPrp4mzoDHxqSRzmME4I-ihzlXVEzxQ7vsUrIh5dEk0Ofp56PgvenniYybY9hX4zOgzD-Cuky_G05tWXjOG4YA=@pm.me> <-AiVyio30HLuInFNcNm3OTLCRNrFpNlkGopLCsL3HBp82dT1Tv1vgf6tbSuSIMvf6L74waKmKB_wcz9S2l0xVjudOu2o36bqEBFTEvvG4fQ=@pm.me> <8373e5c4-03d4-48fe-9e4d-b0c2d36590cc@gutov.dev> <5iagnGUjF-cYYddc4_1kHHViSr60gM5Lt2t0bTESI41QSUxZ3GPGbAhCpmjTawoMcMaB07DPi5_jHc4-m4ow4AKhS3z5evCwxq75_-emwQw=@pm.me> <892be2b8-f3c6-4958-8d49-7db73f6d0b85@gutov.dev> Reply-To: alexis purslane Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha512; boundary="------62c2776556fde9e5efd61baaf159d3e63afa058189cc8310f5de91fd171f8937"; charset=utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39439"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "71200@debbugs.gnu.org" <71200@debbugs.gnu.org>, "michael.albinus@gmx.de" To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 27 04:08:08 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sBPmS-000A26-Jx for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 May 2024 04:08:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBPmG-0004Ih-6U; Sun, 26 May 2024 22:07:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBPmE-0004IJ-3x for bug-gnu-emacs@gnu.org; Sun, 26 May 2024 22:07:54 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sBPmD-0000Vb-Qd for bug-gnu-emacs@gnu.org; Sun, 26 May 2024 22:07:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sBPmL-0007mz-Vb for bug-gnu-emacs@gnu.org; Sun, 26 May 2024 22:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: alexis purslane Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 May 2024 02:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71200 X-GNU-PR-Package: emacs Original-Received: via spool by 71200-submit@debbugs.gnu.org id=B71200.171677563729832 (code B ref 71200); Mon, 27 May 2024 02:08:01 +0000 Original-Received: (at 71200) by debbugs.gnu.org; 27 May 2024 02:07:17 +0000 Original-Received: from localhost ([127.0.0.1]:42798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBPlc-0007l2-LN for submit@debbugs.gnu.org; Sun, 26 May 2024 22:07:17 -0400 Original-Received: from mail-40134.protonmail.ch ([185.70.40.134]:10753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBPlZ-0007kc-Mo for 71200@debbugs.gnu.org; Sun, 26 May 2024 22:07:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1716775616; x=1717034816; bh=KN3GcsboFnUT1un45knyI9P1pZfZfK7Pn8asd+C4qKE=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=Gv4YX9IWQVajUAIpl+rNO8GAnC9DhmkxiCXObjxeCK0xAcYVX5A2XFENCP9ZiuNJQ 3SkfWpjBnKWPfpmD3SexIIjb1CcVxiqf0vpD3fWkwSfo8ETaqCh0yT9e+DWZTFf5NH Qs2O5x18TQbvcTrotq4JgpovCjVCBxIFOJZPXet5DaG+LcEkxV120g2fMprH1+vk1S nWDEvOQORimxi2GCAZTsERvRfBFa1L/WzNNTuFhjQeMD/2g2bSE3FoZoDI9e/lLCYS YAvmRqFbvzUXm3rW+QYJwRBaGxAzeQLD1LHfvRP8OdnLB8XZZbLFaRSXZdE/RZrZCx T6RX/whCWzfUA== In-Reply-To: Feedback-ID: 55030218:user:proton X-Pm-Message-ID: 1f8fef1516fdf33023cde317fbe8a5fe9e11c9f0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286005 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------62c2776556fde9e5efd61baaf159d3e63afa058189cc8310f5de91fd171f8937 Content-Type: multipart/mixed;boundary=---------------------358602f1ce0ceb61bdebd22b8c152688 -----------------------358602f1ce0ceb61bdebd22b8c152688 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain;charset=utf-8 Another piece of code that may be helpful: ``` (advice-add 'project-remember-project ;; If we're about to save a project :before (lambda (pr &optional something) ;; If we're using git, and git detects it as "dubious" (git ls-files =3D 1= 28), (when (and (eq 'Git (cadr pr)) (let ((default-directory (caddr pr)= )) (=3D (shell-command "git ls-fil= es") 128))) ;; Prompt the user if they want to automatically treat it as safe! (when (y-or-n-p "Dubious ownership of repo= sitory detected. Treat as safe? ") (shell-command (concat "git config --global --add sa= fe.directory " (eshell-escape-arg (directory= -file-name (file-local-name (caddr pr)))))))))) ``` It basically emulates VSCode's reaction to untrusted repositories. On Sunday, May 26th, 2024 at 10:48 PM, alexis purslane wrote: > Thanks for the detailed response! Re: ssh keys and committing, I knew th= at, sorry for my unclear phrasing --- lack of sharing ssh keys was making = pushing fail, and lack of sharing gpg keys was making committing fail (I s= ign my commits with my private key). I'm working on ssh forwarding right n= ow, although trying to sort of skip out on the whole thing by creating a t= ramp-method for distrobox and letting distrobox do it for me. I'll update = to the new project.el soonish and let you know if the errors work better! > = > On Sunday, May 26th, 2024 at 10:44 PM, Dmitry Gutov dmitry@gutov.dev wro= te: > = > > On 27/05/2024 00:43, alexis purslane wrote: > > = > > > Follow up: > > > = > > > I have these containers installed: > > > = > > > 1. devcontainers/rust:latest > > > 2. devcontainers/typescript-node:latest > > > 3. devcontainers/cpp:latest > > > 4. texlive/texlive:latest > > > 5. tensorflow/tensorflow:latest-gpu > > > = > > > Only one of them wor-- > > > = > > > .... > > > = > > > Oh. > > > = > > > Git keeps "detecting dubious ownership" over each project's > > > .git/ > > > for some reason, which prevents `git ls-files` from running, > > = > > That's possible. > > = > > > hence the > > > problem. So this isn't really a bug per-se, it's more like a lack > > > of > > > clear enough errors. > > = > > Yep. Poor error reporting came up not too long ago, and it's improved = on > > master: > > https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=3D8d3e4e823f21d= 5a > > = > > I have now bumped the version headers for xref.el and project.el. > > = > > Try installing project 0.11.0 (it will be out on ELPA sometime in the > > next 24 hours), the errors should be easier to understand now. > > = > > > I could also really use some help with getting the ownership and > > > gpg & ssh > > > keychain stuff (commits always fail because Magit over TRAMP can't > > > access my GPG or SSH private keys) figured out over TRAMP but I can = get that help > > > elsewhere. > > = > > Looking around the internet, it seems the error "detecting dubious > > ownership" comes down to file ownership - here's one of the possible > > solutions (https://askubuntu.com/a/1445820), but there are several > > different approaches being recommended in different SO and SE answers. > > = > > To make a commit, you just need to have git config for user.name and > > user.email on the working machine - ssh keys are usually not required > > unless you're trying to sign commits as well. > > = > > It's pushing commits to a remote (or pulling, or cloning) that usually > > becomes a problem. Over ssh, one usually solves that by enabling > > "authentication agent forwarding" - logging in with "ssh -A'. > > = > > I'm not sure what is the preferred solution when using podman, but > > here's an article that describes sharing your .ssh directory with the > > container: > > https://devcodef1.com/news/1088795/ssh-agent-forwarding-in-podman-cont= ainer > > (step number 3). > > = > > Of course that's only safe if you're the only one with access to it. > > = > > > Anyway, when git ls-files fails, maybe the stderr output it > > > produced should be > > > printed instead of just trying to parse its empty stdin and > > > crashing. > > = > > Let me know how how it works for you. -----------------------358602f1ce0ceb61bdebd22b8c152688 Content-Type: application/pgp-keys; filename="publickey - alexispurslane@pm.me - 0x41E61568.asc"; name="publickey - alexispurslane@pm.me - 0x41E61568.asc" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="publickey - alexispurslane@pm.me - 0x41E61568.asc"; name="publickey - alexispurslane@pm.me - 0x41E61568.asc" LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgp4ak1FWXlPNktCWUpLd1lCQkFI YVJ3OEJBUWRBaW0wYXBzbTJaTmd1N1lYU3VDLzNUVjUvenhNZE1tWDMKazhUZllSUVlRaXZOSzJG c1pYaHBjM0IxY25Oc1lXNWxRSEJ0TG0xbElEeGhiR1Y0YVhOd2RYSnpiR0Z1ClpVQndiUzV0WlQ3 Q2pBUVFGZ29BSFFVQ1l5TzZLQVFMQ1FjSUF4VUlDZ1FXQUFJQkFoa0JBaHNEQWg0QgpBQ0VKRVBQ S1ZsRUw1OThSRmlFRVFlWVZhTDAydVRUczdkdzI4OHBXVVF2bjN4RlJ2Z0QrTUUzdEhXOFgKdGpt NXdqeU9zVzQ1NjIxSEpGUXdGZnVnbGZZczlkVU03YTRBLzNFeEppdFVMTk1mdy9DRlVIbVAyR21T Ckp1blE1cENNYzkyM1FYdytPZjBMempnRVl5TzZLQklLS3dZQkJBR1hWUUVGQVFFSFFBVHJrMXFN Q0FVVgpDMFRBeFAvV3B6QjY4MG5DVmNlK1E2OVNPUWR6Uk9VY0F3RUlCOEo0QkJnV0NBQUpCUUpq STdvb0Foc00KQUNFSkVQUEtWbEVMNTk4UkZpRUVRZVlWYUwwMnVUVHM3ZHcyODhwV1VRdm4zeEc5 VkFFQTlDV1Q5bHVuCldWZG5MWis0RlpySUZKZW9EUFAzTE9Jd09oRFVnY1ZtZU8wQS9qdHVjYjRk eERzVTFiRjNkVjlHbGszaQo1SDJZcnIvRTJBYVlMbWFOVVBvTgo9SzRRaQotLS0tLUVORCBQR1Ag UFVCTElDIEtFWSBCTE9DSy0tLS0tCg== -----------------------358602f1ce0ceb61bdebd22b8c152688-- --------62c2776556fde9e5efd61baaf159d3e63afa058189cc8310f5de91fd171f8937 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: ProtonMail wnUEARYKACcFgmZT6qwJkPPKVlEL598RFiEEQeYVaL02uTTs7dw288pWUQvn 3xEAAFCoAP47Wtgnp2ZrdC3c/55P2VRsdConfmqeyhRoRa/FFsjMRwD/VzIq YMYrJevF9EWFh2wd0yspGj6ZGOuhGUzxYpJjNgQ= =8106 -----END PGP SIGNATURE----- --------62c2776556fde9e5efd61baaf159d3e63afa058189cc8310f5de91fd171f8937--