Re: [go-nuts] Need help running "go get" on self hosted git server

2023-12-18 Thread 'Dan Kortschak' via golang-nuts
On Sun, 2023-12-17 at 07:06 -0800, Brijesh Wawdhane wrote:
> I added a go-import meta tag to my git server's website on the repo
> page and it looks like
> 
> https://brijesh.dev/kairos.git;>
> 
> but when I try running "go get brijesh.dev/kairos" I get an error
> saying 'go: unrecognized import path "brijesh.dev/kairos": reading
> https://brijesh.dev/kairos?go-get=1: 404 Not Found'
> 
> it is probably because it is looking at
> https://brijesh.dev/kairos?go-get=1(which is invalid) and not
> https://brijesh.dev/kairos.git?go-get=1(the correct address) even
> though it the url is with .git in the go-import tag

If you go to the page for the repo[1] with a browser and attempt to
follow the link for the commit[2], it gives a 404, so the server seems
sick.

[1]https://brijesh.dev/kairos.git
[2]https://brijesh.dev/kairos/commit/fa700f82d14a5a319cb6267a7dbde994683067ca

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/5106cb1b23fdd2547486156e05c6910122ce9e0a.camel%40kortschak.io.


[go-nuts] [security] Vulnerability in golang.org/x/crypto/ssh

2023-12-18 Thread Roland Shoemaker
Hello gophers,

Version v0.17.0 of golang.org/x/crypto fixes a protocol weakness in the
golang.org/x/crypto/ssh package that allowed a MITM attacker to compromise
the integrity of the secure channel before it was established, allowing
them to prevent transmission of a number of messages immediately after the
secure channel was established without either side being aware.

The impact of this attack is relatively limited, as it does not compromise
confidentiality of the channel. Notably this attack would allow an attacker
to prevent the transmission of the SSH2_MSG_EXT_INFO message, disabling a
handful of newer security features.

This protocol weakness was also fixed in OpenSSH 9.6.

Thanks to Fabian Bäumer, Marcus Brinkmann, and Jörg Schwenk from Ruhr
University Bochum for reporting this issue.

This is CVE-2023-48795 and Go issue https://go.dev/issue/64784.

Cheers,
Roland on behalf of the Go team

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CADAOFNTCx-oQ1JqXhVh-wU_7JuwLkhKnN-cwnkuxavHQm6Fo%2Bg%40mail.gmail.com.


Re: [go-nuts] Re: go mod download fails on docker for 1.20 (but not for 1.18)

2023-12-18 Thread Eduardo Luís
Did anyone found a fix for this? I still have this problem after 6 months.
It allows me to up a single container but it seems to have a 5 minute 
cooldown before I can up another one without an error, which takes a long 
time on projects with multiple services.

Error example on Ubuntu22 with golang:1.20-alpine image
```
go: github.com/alexliesenfeld/health@v0.8.0: Get 
"https://proxy.golang.org/github.com/alexliesenfeld/health/@v/v0.8.0.mod": 
dial tcp [2a00:1450:4003:80e::2011]:443: connect: cannot assign requested 
address
```
A segunda-feira, 22 de maio de 2023 à(s) 21:45:02 UTC+1, TheDiveO escreveu:

> The thing that finally caught my eye is the "connect: cannot assign  
> requested address" part in the error message. You can search for it in 
> combination with golang. I'm not exactly clear but this could be related to 
> running out of socket or port resources, maybe in combination with changes 
> in how many parallel HTTP requests are fired off by go mod tidy and go mod 
> download. The overall communication/socket "load" of your system might also 
> be a factor to look at.
> On Monday, May 22, 2023 at 12:04:01 PM UTC+2 Joao Miguel Ferreira wrote:
>
>> Hello Jim and Harald,
>>
>> please find below the answers to your questions. if anything else could 
>> help, please let me know
>>
>> about the container configuration for ipv6, it seems that there is no 
>> such configuration for containers running from the base images (1.18, 1.20, 
>> bullseye seems to not have the ip command installed)
>>
>> $ docker run -it golang:1.18-buster sh -c "ip -6 addr show dev eth0; ip 
>> -6 route show"
>> $ docker run -it golang:1.18-bullseye sh -c "ip -6 addr show dev eth0; ip 
>> -6 route show"
>> sh: 1: ip: not found
>> sh: 1: ip: not found
>> $ docker run -it golang:1.18-alpine sh -c "ip -6 addr show dev eth0; ip 
>> -6 route show"
>> $ docker run -it golang:1.20-buster sh -c "ip -6 addr show dev eth0; ip 
>> -6 route show"
>> $ docker run -it golang:1.20-bullseye sh -c "ip -6 addr show dev eth0; ip 
>> -6 route show"
>> sh: 1: ip: not found
>> sh: 1: ip: not found
>> $ docker run -it golang:1.20-alpine sh -c "ip -6 addr show dev eth0; ip 
>> -6 route show"
>>
>> I add here a sample of the same command for ipv4 just to clarify:
>>
>> $ docker run -it golang:1.20-buster sh -c "ip -4 addr show dev eth0; ip 
>> -4 route show"
>> 52: eth0@if53:  mtu 1500 qdisc noqueue 
>> state UP group default  link-netnsid 0
>> inet 172.17.0.2/16 brd 172.17.255.255 scope global eth0
>>valid_lft forever preferred_lft forever
>> default via 172.17.0.1 dev eth0
>> 172.17.0.0/16 dev eth0 proto kernel scope link src 172.17.0.2
>>  
>> On Mon, May 22, 2023 at 7:55 AM TheDiveO  wrote:
>>
>>> ? base system distribution?
>>> ? do you have IPv6 connectivity at all?
>>> ? which docker version?
>>>
>>
>> b) about my host and docker version and connectivity
>> I am using Debian11 with apt provided docker; docker version is 20.10.5. 
>> I am also using 2 VMs with Debian 12 and Ubuntu 22 and I have the same 
>> problem there.
>> I have an ipv6 address on the host network interface and I can ping6 to 
>> localhost and to google, also. Please find more details below:
>>
>> jmf@deb11tp:~$ ping6 -c 3 localhost
>> PING localhost(localhost (::1)) 56 data bytes
>> 64 bytes from localhost (::1): icmp_seq=1 ttl=64 time=0.043 ms
>> 64 bytes from localhost (::1): icmp_seq=2 ttl=64 time=0.035 ms
>> 64 bytes from localhost (::1): icmp_seq=3 ttl=64 time=0.054 ms
>>
>> jmf@deb11tp:~$ ping6 -c 3 www.google.com
>> PING www.google.com(mad41s13-in-x04.1e100.net 
>> (2a00:1450:4003:80e::2004)) 56 data bytes
>> 64 bytes from mad41s13-in-x04.1e100.net (2a00:1450:4003:80e::2004): 
>> icmp_seq=1 ttl=58 time=16.6 ms
>> 64 bytes from mad41s13-in-x04.1e100.net (2a00:1450:4003:80e::2004): 
>> icmp_seq=2 ttl=58 time=16.9 ms
>> 64 bytes from mad41s13-in-x04.1e100.net (2a00:1450:4003:80e::2004): 
>> icmp_seq=3 ttl=58 time=16.4 ms
>>
>> jmf@deb11tp:~$ ip addr show dev wlp5s0
>> 3: wlp5s0:  mtu 1500 qdisc noqueue state 
>> UP group default qlen 1000
>> link/ether 18:56:80:2f:33:48 brd ff:ff:ff:ff:ff:ff
>> inet 192.168.1.65/24 brd 192.168.1.255 scope global dynamic 
>> noprefixroute wlp5s0
>>valid_lft 1832sec preferred_lft 1832sec
>> inet6 2001:8a0:ffa9:9800:a681:184e:ee1b:1800/64 scope global dynamic 
>> noprefixroute
>>valid_lft 89765sec preferred_lft 89765sec
>> inet6 fe80::d3e8:44e:9bfa:c6f8/64 scope link noprefixroute
>>valid_lft forever preferred_lft forever
>>
>> I try to be clear: this happens during "docker build", on the "go mod 
>> download" and in some cases also on the "go mod tidy". it does not happen 
>> on any of the 1.18 base images, whatever host I use. It happens on all 1.20 
>> base images. 
>>
>> Thank you for your attention
>> João
>>  
>>
>>>
>>> On Monday, May 22, 2023 at 2:29:08 AM UTC+2 Joao Miguel Ferreira wrote:
>>>
 Hello all,

 My docker build is ok with FROM golang:1.18-alpine, FROM 

Re: [go-nuts] Need help running "go get" on self hosted git server

2023-12-18 Thread Jan Mercl
On Mon, Dec 18, 2023 at 2:19 PM Brijesh Wawdhane 
wrote:

> I added a go-import meta tag to my git server's website on the repo page
and it looks like
>
> https://brijesh.dev/kairos.git;>
>
> but when I try running "go get brijesh.dev/kairos" I get an error saying
'go: unrecognized import path "brijesh.dev/kairos": reading
https://brijesh.dev/kairos?go-get=1: 404 Not Found'
>
> it is probably because it is looking at
https://brijesh.dev/kairos?go-get=1(which is invalid) and not
https://brijesh.dev/kairos.git?go-get=1(the correct address) even though it
the url is with .git in the go-import tag

I'm not sure what is correct, but FTR this redirector service reports the
redirected URL without the .git suffix and it works as intended:


jnml@3900x:~/tmp$ wget modernc.org/sqlite
--2023-12-18 14:57:40--  http://modernc.org/sqlite
Resolving modernc.org (modernc.org)... 216.239.34.21, 216.239.32.21,
216.239.38.21, ...
Connecting to modernc.org (modernc.org)|216.239.34.21|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://modernc.org/sqlite [following]
--2023-12-18 14:57:40--  https://modernc.org/sqlite
Connecting to modernc.org (modernc.org)|216.239.34.21|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 577 [text/html]
Saving to: 'sqlite'

sqlite
 
100%[=>]
577  --.-KB/sin 0s

2023-12-18 14:57:41 (20.6 MB/s) - 'sqlite' saved [577/577]

jnml@3900x:~/tmp$ cat sqlite




https://gitlab.com/cznic/sqlite;>
https://gitlab.com/cznic/sqlite/blob/master{/dir}
https://gitlab.com/cznic/sqlite/blob/master{/dir}/{file}#L{line};>
https://godoc.org/modernc.org/sqlite;>


Redirecting to docs at https://godoc.org/modernc.org/sqlite;>
godoc.org/modernc.org/sqlite...


jnml@3900x:~/tmp$


-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAA40n-We%3D%3Dsm812yorAgKgH8hZmM2Akm3P%2BpzpJR9dLD%2BfNV6w%40mail.gmail.com.


[go-nuts] Need help running "go get" on self hosted git server

2023-12-18 Thread Brijesh Wawdhane
I added a go-import meta tag to my git server's website on the repo page 
and it looks like

https://brijesh.dev/kairos.git;>

but when I try running "go get brijesh.dev/kairos" I get an error saying 
'go: unrecognized import path "brijesh.dev/kairos": reading 
https://brijesh.dev/kairos?go-get=1: 404 Not Found'

it is probably because it is looking at 
https://brijesh.dev/kairos?go-get=1(which is invalid) and not 
https://brijesh.dev/kairos.git?go-get=1(the correct address) even though it 
the url is with .git in the go-import tag

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/5a2e814b-3e80-4604-9946-636fd077b4c0n%40googlegroups.com.


Re: [go-nuts] unix.Select with fd gotten from named pipe on macos behaves differently compared to linux

2023-12-18 Thread 'TheDiveO' via golang-nuts
It actually *does *work (again, there's a unit test as well as working code 
for five years now), but good to know that it is actually useless, so this 
is something to remove as part of the usual maintenance chores.

On Sunday, December 17, 2023 at 6:43:51 AM UTC+1 Kurtis Rader wrote:

On Fri, Dec 15, 2023 at 7:13 AM 'TheDiveO' via golang-nuts <
golan...@googlegroups.com> wrote:

I'm opening both named pipe ends as follows (in different processes):

os.OpenFile(fifoname, os.O_WRONLY, os.ModeNamedPipe)
os.OpenFile(fifoname, os.O_RDONLY, os.ModeNamedPipe)


Passing  os.ModeNamedPipe to os.OpenFile doesn't make any sense unless the 
open is creating the named pipe by also including os.O_CREATE and it's not 
clear doing so is even valid (I haven't tested whether it works). You can't 
force a file to behave like a named pipe by passing that value to the 
os.OpenFile function and that flag isn't needed to open an existing named 
pipe. The os.ModeNamedPipe constant is meant to be used when testing the 
file mode returned by os.Stat. You would normally use the unix.Mkfifo 
function to create a named pipe.

-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/dea55bb6-c962-4614-8ebe-21220ff8efc9n%40googlegroups.com.


Re: [go-nuts] unix.Select with fd gotten from named pipe on macos behaves differently compared to linux

2023-12-18 Thread 'TheDiveO' via golang-nuts
Please note that the unit test I linked to tests on the "writing end" of 
the pipe. In fact, I wrote in the OP right in my first sentence:

> *Hi, I need to detect on the producer side (writing end) of a named pipe 
when the consumer (reading end) has disconnect/closed. *

I'm afraid, but you are not reproducing the situation I was asking for and 
provided a unit test for.

On Sunday, December 17, 2023 at 6:16:45 AM UTC+1 Kurtis Rader wrote:

I should probably clarify that my copy of TheDiveO code simply added the 
following function and replaced the use of github.com/sirupsen/logrus with 
println.

func main() {
f, err := os.OpenFile("p", os.O_RDONLY, 0)
if err != nil {
println("open p", err.Error())
os.Exit(1)
}
println("fifo opened")
WaitTillBreak(f)
}


-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/badca3c7-f532-4bf2-8f0d-3085eeb77aa4n%40googlegroups.com.