<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Muhammad Ilham hidayat</title>
    <description>The latest articles on Forem by Muhammad Ilham hidayat (@milhamh95).</description>
    <link>https://forem.com/milhamh95</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F70078%2F40132256-d951-473c-a849-368b79f15e6b.jpeg</url>
      <title>Forem: Muhammad Ilham hidayat</title>
      <link>https://forem.com/milhamh95</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/milhamh95"/>
    <language>en</language>
    <item>
      <title>Fix Unexpected Signal During Runtime Execution Go 1.17</title>
      <dc:creator>Muhammad Ilham hidayat</dc:creator>
      <pubDate>Sun, 23 Jan 2022 04:20:11 +0000</pubDate>
      <link>https://forem.com/milhamh95/fix-unexpected-signal-during-runtime-execution-go-117-okg</link>
      <guid>https://forem.com/milhamh95/fix-unexpected-signal-during-runtime-execution-go-117-okg</guid>
      <description>&lt;p&gt;Recently, when I ran Go code with version 1.17 on macOS Big Sur 11.6, I got this fatal error response 🥴&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;fatal&lt;/span&gt; &lt;span class="kt"&gt;error&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;unexpected&lt;/span&gt; &lt;span class="n"&gt;signal&lt;/span&gt; &lt;span class="n"&gt;during&lt;/span&gt; &lt;span class="n"&gt;runtime&lt;/span&gt; &lt;span class="n"&gt;execution&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;signal&lt;/span&gt; &lt;span class="n"&gt;SIGSEGV&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;segmentation&lt;/span&gt; &lt;span class="n"&gt;violation&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;0x1&lt;/span&gt; &lt;span class="n"&gt;addr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;0xb01dfacedebac1e&lt;/span&gt; &lt;span class="n"&gt;pc&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;0x7fff204acc9e&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="n"&gt;runtime&lt;/span&gt; &lt;span class="n"&gt;stack&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
&lt;span class="n"&gt;runtime&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;unexpected&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;pc&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;runtime&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sigpanic&lt;/span&gt; &lt;span class="n"&gt;called&lt;/span&gt; &lt;span class="n"&gt;from&lt;/span&gt; &lt;span class="m"&gt;0x7fff204acc9e&lt;/span&gt;
&lt;span class="n"&gt;stack&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;frame&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;sp&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="m"&gt;0x7ffeefbff578&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fp&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="m"&gt;0x7ffeefbff5c8&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;stack&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;0x7ffeefb80618&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;0x7ffeefbff680&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="m"&gt;0x00007ffeefbff478&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;  &lt;span class="m"&gt;0x01007ffeefbff498&lt;/span&gt;  &lt;span class="m"&gt;0x0000000000000004&lt;/span&gt;
&lt;span class="m"&gt;0x00007ffeefbff488&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;  &lt;span class="m"&gt;0x000000000000001f&lt;/span&gt;  &lt;span class="m"&gt;0x00007fff204acc9e&lt;/span&gt;
&lt;span class="m"&gt;0x00007ffeefbff498&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;  &lt;span class="m"&gt;0x0b01dfacedebac1e&lt;/span&gt;  &lt;span class="m"&gt;0x0000000000000001&lt;/span&gt;
&lt;span class="m"&gt;0x00007ffeefbff4a8&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;  &lt;span class="m"&gt;0x00000000040362f1&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;runtime&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;throw&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="m"&gt;0x0000000000000071&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;  &lt;span class="m"&gt;0x00007ffeefbff548&lt;/span&gt;
&lt;span class="m"&gt;0x00007ffeefbff4b8&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;  &lt;span class="m"&gt;0x00000000049112ab&lt;/span&gt;  &lt;span class="m"&gt;0x00007ffeefbff500&lt;/span&gt;
&lt;span class="m"&gt;0x00007ffeefbff4c8&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;  &lt;span class="m"&gt;0x00000000040365a8&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;runtime&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fatalthrow&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;func1&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="m"&gt;0x0000000000000048&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;  &lt;span class="m"&gt;0x0000000004f41400&lt;/span&gt;
&lt;span class="o"&gt;........&lt;/span&gt;
&lt;span class="n"&gt;exit&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;
&lt;span class="c"&gt;// https://gist.github.com/milhamh95/ff194322cecd6ba56573b2eddaecf13a&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;When I searched through the stack trace, I completely didn’t understand what is the error and the solution 😐. &lt;/p&gt;

&lt;p&gt;Luckily, I found the same issue at Go Github issues.&lt;/p&gt;


&lt;div class="ltag_github-liquid-tag"&gt;
  &lt;h1&gt;
    &lt;a href="https://github.com/golang/go/issues/46763" rel="noopener noreferrer"&gt;
      &lt;img class="github-logo" alt="GitHub logo" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg"&gt;
      &lt;span class="issue-title"&gt;
        runtime: unexpected signal during runtime execution in Go 1.17 but not Go 1.16
      &lt;/span&gt;
      &lt;span class="issue-number"&gt;#46763&lt;/span&gt;
    &lt;/a&gt;
  &lt;/h1&gt;
  &lt;div class="github-thread"&gt;
    &lt;div class="timeline-comment-header"&gt;
      &lt;a href="https://github.com/marwan-at-work" rel="noopener noreferrer"&gt;
        &lt;img class="github-liquid-tag-img" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F16294261%3Fv%3D4" alt="marwan-at-work avatar"&gt;
      &lt;/a&gt;
      &lt;div class="timeline-comment-header-text"&gt;
        &lt;strong&gt;
          &lt;a href="https://github.com/marwan-at-work" rel="noopener noreferrer"&gt;marwan-at-work&lt;/a&gt;
        &lt;/strong&gt; posted on &lt;a href="https://github.com/golang/go/issues/46763" rel="noopener noreferrer"&gt;&lt;time&gt;Jun 15, 2021&lt;/time&gt;&lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag-github-body"&gt;
      &lt;h3&gt;
&lt;span class="octicon octicon-link"&gt;&lt;/span&gt;What version of Go are you using (&lt;code&gt;go version&lt;/code&gt;)?&lt;/h3&gt;
&lt;pre&gt;
$ go version
go version go1.17beta1 darwin/amd64
&lt;/pre&gt;
&lt;h3&gt;
&lt;span class="octicon octicon-link"&gt;&lt;/span&gt;Does this issue reproduce with the latest release?&lt;/h3&gt;
&lt;p&gt;Yes for 1.17 no for latest stable release (1.16)&lt;/p&gt;
&lt;h3&gt;
&lt;span class="octicon octicon-link"&gt;&lt;/span&gt;What operating system and processor architecture are you using (&lt;code&gt;go env&lt;/code&gt;)?&lt;/h3&gt;
&lt;code&gt;go env&lt;/code&gt; Output&lt;br&gt;&lt;pre&gt;
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/marwansulaiman/Library/Caches/go-build"
GOENV="/Users/marwansulaiman/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/marwansulaiman/go/pkg/mod"
GONOPROXY=""
GONOSUMDB="marwan.io/*,github.com/marwan-at-work/*,github.com/github/*"
GOOS="darwin"
GOPATH="/Users/marwansulaiman/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.17beta1"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/marwansulaiman/marwan/gorme/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/j7/fhzzr84926x491hwp37ltv_r0000gn/T/go-build1384886840=/tmp/go-build -gno-record-gcc-switches -fno-common"
&lt;/pre&gt;
&lt;h3&gt;
&lt;span class="octicon octicon-link"&gt;&lt;/span&gt;What did you do?&lt;/h3&gt;
&lt;p&gt;The steps are quite reproducible:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install go1.17 beta for mac.&lt;/li&gt;
&lt;li&gt;Run the following commands:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code&gt;$ mkdir gorme &amp;amp;&amp;amp; cd ./gorme
$ go mod init gorme
go: creating new go.mod: module gorme
$ go get github.com/sirupsen/logrus
go get: added github.com/sirupsen/logrus v1.8.1
$ go get github.com/lightstep/lightstep-tracer-go
go get: added github.com/lightstep/lightstep-tracer-go v0.25.0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Add the following main.go file:&lt;/p&gt;
&lt;div class="highlight highlight-source-go js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-k"&gt;package&lt;/span&gt; main

&lt;span class="pl-k"&gt;import&lt;/span&gt; &lt;span class="pl-s"&gt;"github.com/sirupsen/logrus"&lt;/span&gt;

&lt;span class="pl-k"&gt;import&lt;/span&gt; (
    _ &lt;span class="pl-s"&gt;"github.com/lightstep/lightstep-tracer-go"&lt;/span&gt;
)

&lt;span class="pl-k"&gt;func&lt;/span&gt; &lt;span class="pl-en"&gt;main&lt;/span&gt;() {
    &lt;span class="pl-s1"&gt;l&lt;/span&gt; &lt;span class="pl-c1"&gt;:=&lt;/span&gt; &lt;span class="pl-s1"&gt;logrus&lt;/span&gt;.&lt;span class="pl-en"&gt;New&lt;/span&gt;()
    &lt;span class="pl-s1"&gt;l&lt;/span&gt;.&lt;span class="pl-en"&gt;Info&lt;/span&gt;(&lt;span class="pl-s"&gt;"hello"&lt;/span&gt;)
}&lt;/pre&gt;

&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;$ go mod tidy
$ go run -trimpath .
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff6d88a70a]

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff6d88a70a
stack: frame={sp:0x7ffeefbff228, fp:0x7ffeefbff278} stack=[0x7ffeefb802c8,0x7ffeefbff330)
0x00007ffeefbff128:  0x01007ffeefbff148  0x0000000000000004 
0x00007ffeefbff138:  0x000000000000001f  0x00007fff6d88a70a 
0x00007ffeefbff148:  0x0b01dfacedebac1e  0x0000000000000001 
0x00007ffeefbff158:  0x0000000004034951 &amp;lt;runtime.throw+0x0000000000000071&amp;gt;  0x00007ffeefbff1f8 
0x00007ffeefbff168:  0x000000000445e6de  0x00007ffeefbff1b0 
0x00007ffeefbff178:  0x0000000004034c08 &amp;lt;runtime.fatalthrow.func1+0x0000000000000048&amp;gt;  0x00000000047c4d40 
0x00007ffeefbff188:  0x0000000000000001  0x0000000000000001 
0x00007ffeefbff198:  0x00007ffeefbff1f8  0x0000000004034951 &amp;lt;runtime.throw+0x0000000000000071&amp;gt; 
0x00007ffeefbff1a8:  0x00000000047c4d40  0x00007ffeefbff1e8 
0x00007ffeefbff1b8:  0x0000000004034b90 &amp;lt;runtime.fatalthrow+0x0000000000000050&amp;gt;  0x00007ffeefbff1c8 
0x00007ffeefbff1c8:  0x0000000004034bc0 &amp;lt;runtime.fatalthrow.func1+0x0000000000000000&amp;gt;  0x00000000047c4d40 
0x00007ffeefbff1d8:  0x0000000004034951 &amp;lt;runtime.throw+0x0000000000000071&amp;gt;  0x00007ffeefbff1f8 
0x00007ffeefbff1e8:  0x00007ffeefbff218  0x0000000004034951 &amp;lt;runtime.throw+0x0000000000000071&amp;gt; 
0x00007ffeefbff1f8:  0x00007ffeefbff200  0x0000000004034980 &amp;lt;runtime.throw.func1+0x0000000000000000&amp;gt; 
0x00007ffeefbff208:  0x00000000044649ef  0x000000000000002a 
0x00007ffeefbff218:  0x00007ffeefbff268  0x0000000004049f36 &amp;lt;runtime.sigpanic+0x0000000000000396&amp;gt; 
0x00007ffeefbff228: &amp;lt;0x00000000044649ef  0x0000000000000000 
0x00007ffeefbff238:  0x00007ffeefbff2a8  0x0000000004027866 &amp;lt;runtime.(*mheap).allocSpan+0x0000000000000546&amp;gt; 
0x00007ffeefbff248:  0x000000c00023a000  0x0000000000004000 
0x00007ffeefbff258:  0x00007fff00000008  0x000000c0001b0000 
0x00007ffeefbff268:  0x00007ffeefbff2b0 !0x00007fff6d88a70a 
0x00007ffeefbff278: &amp;gt;0x00007ffeefbff2b0  0x0000000004760000 
0x00007ffeefbff288:  0x000000000000043d  0x0000000004101185 &amp;lt;golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005&amp;gt; 
0x00007ffeefbff298:  0x0000000004065d9f &amp;lt;runtime.syscall+0x000000000000001f&amp;gt;  0x000000c0001af640 
0x00007ffeefbff2a8:  0x000000000406570c &amp;lt;runtime.nanotime_trampoline+0x000000000000000c&amp;gt;  0x000000c0001af610 
0x00007ffeefbff2b8:  0x0000000004063c10 &amp;lt;runtime.asmcgocall+0x0000000000000070&amp;gt;  0x0000000000000002 
0x00007ffeefbff2c8:  0x0000000004005d00 &amp;lt;runtime.cgoCheckWriteBarrier+0x0000000000000020&amp;gt;  0x5d00000000001018 
0x00007ffeefbff2d8:  0x0000000000000000  0x00000000047f7a58 
0x00007ffeefbff2e8:  0x0000000000000a18  0x000000c0000001a0 
0x00007ffeefbff2f8:  0x0000000004061d29 &amp;lt;runtime.systemstack+0x0000000000000049&amp;gt;  0x0000000000000004 
0x00007ffeefbff308:  0x00000000044d2170  0x00000000047c4d40 
0x00007ffeefbff318:  0x00007ffeefbff368  0x0000000004061c25 &amp;lt;runtime.mstart+0x0000000000000005&amp;gt; 
0x00007ffeefbff328:  0x0000000004061bdd &amp;lt;runtime.rt0_go+0x000000000000013d&amp;gt; 
runtime.throw({0x44649ef, 0x0})
        runtime/panic.go:1198 +0x71
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff6d88a70a
stack: frame={sp:0x7ffeefbff228, fp:0x7ffeefbff278} stack=[0x7ffeefb802c8,0x7ffeefbff330)
0x00007ffeefbff128:  0x01007ffeefbff148  0x0000000000000004 
0x00007ffeefbff138:  0x000000000000001f  0x00007fff6d88a70a 
0x00007ffeefbff148:  0x0b01dfacedebac1e  0x0000000000000001 
0x00007ffeefbff158:  0x0000000004034951 &amp;lt;runtime.throw+0x0000000000000071&amp;gt;  0x00007ffeefbff1f8 
0x00007ffeefbff168:  0x000000000445e6de  0x00007ffeefbff1b0 
0x00007ffeefbff178:  0x0000000004034c08 &amp;lt;runtime.fatalthrow.func1+0x0000000000000048&amp;gt;  0x00000000047c4d40 
0x00007ffeefbff188:  0x0000000000000001  0x0000000000000001 
0x00007ffeefbff198:  0x00007ffeefbff1f8  0x0000000004034951 &amp;lt;runtime.throw+0x0000000000000071&amp;gt; 
0x00007ffeefbff1a8:  0x00000000047c4d40  0x00007ffeefbff1e8 
0x00007ffeefbff1b8:  0x0000000004034b90 &amp;lt;runtime.fatalthrow+0x0000000000000050&amp;gt;  0x00007ffeefbff1c8 
0x00007ffeefbff1c8:  0x0000000004034bc0 &amp;lt;runtime.fatalthrow.func1+0x0000000000000000&amp;gt;  0x00000000047c4d40 
0x00007ffeefbff1d8:  0x0000000004034951 &amp;lt;runtime.throw+0x0000000000000071&amp;gt;  0x00007ffeefbff1f8 
0x00007ffeefbff1e8:  0x00007ffeefbff218  0x0000000004034951 &amp;lt;runtime.throw+0x0000000000000071&amp;gt; 
0x00007ffeefbff1f8:  0x00007ffeefbff200  0x0000000004034980 &amp;lt;runtime.throw.func1+0x0000000000000000&amp;gt; 
0x00007ffeefbff208:  0x00000000044649ef  0x000000000000002a 
0x00007ffeefbff218:  0x00007ffeefbff268  0x0000000004049f36 &amp;lt;runtime.sigpanic+0x0000000000000396&amp;gt; 
0x00007ffeefbff228: &amp;lt;0x00000000044649ef  0x0000000000000000 
0x00007ffeefbff238:  0x00007ffeefbff2a8  0x0000000004027866 &amp;lt;runtime.(*mheap).allocSpan+0x0000000000000546&amp;gt; 
0x00007ffeefbff248:  0x000000c00023a000  0x0000000000004000 
0x00007ffeefbff258:  0x00007fff00000008  0x000000c0001b0000 
0x00007ffeefbff268:  0x00007ffeefbff2b0 !0x00007fff6d88a70a 
0x00007ffeefbff278: &amp;gt;0x00007ffeefbff2b0  0x0000000004760000 
0x00007ffeefbff288:  0x000000000000043d  0x0000000004101185 &amp;lt;golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005&amp;gt; 
0x00007ffeefbff298:  0x0000000004065d9f &amp;lt;runtime.syscall+0x000000000000001f&amp;gt;  0x000000c0001af640 
0x00007ffeefbff2a8:  0x000000000406570c &amp;lt;runtime.nanotime_trampoline+0x000000000000000c&amp;gt;  0x000000c0001af610 
0x00007ffeefbff2b8:  0x0000000004063c10 &amp;lt;runtime.asmcgocall+0x0000000000000070&amp;gt;  0x0000000000000002 
0x00007ffeefbff2c8:  0x0000000004005d00 &amp;lt;runtime.cgoCheckWriteBarrier+0x0000000000000020&amp;gt;  0x5d00000000001018 
0x00007ffeefbff2d8:  0x0000000000000000  0x00000000047f7a58 
0x00007ffeefbff2e8:  0x0000000000000a18  0x000000c0000001a0 
0x00007ffeefbff2f8:  0x0000000004061d29 &amp;lt;runtime.systemstack+0x0000000000000049&amp;gt;  0x0000000000000004 
0x00007ffeefbff308:  0x00000000044d2170  0x00000000047c4d40 
0x00007ffeefbff318:  0x00007ffeefbff368  0x0000000004061c25 &amp;lt;runtime.mstart+0x0000000000000005&amp;gt; 
0x00007ffeefbff328:  0x0000000004061bdd &amp;lt;runtime.rt0_go+0x000000000000013d&amp;gt; 
runtime.sigpanic()
        runtime/signal_unix.go:719 +0x396

goroutine 1 [syscall]:
syscall.syscall(0x4101180, 0x2, 0x40487413, 0xc0001af6d0)
        runtime/sys_darwin.go:22 +0x3b fp=0xc0001af640 sp=0xc0001af620 pc=0x40609bb
syscall.syscall(0x90f0f67d3201c856, 0x7de8cfa85ade3600, 0xb9d8eea6e34af808, 0xd822576cb22b7f61)
        &amp;lt;autogenerated&amp;gt;:1 +0x26 fp=0xc0001af688 sp=0xc0001af640 pc=0x4066566
golang.org/x/sys/unix.ioctl(0x3530ae4f63bfad50, 0x786493e590fecfac, 0x2154961679b0d)
        golang.org/x/sys@v0.0.0-20210217105451-b926d437f341/unix/zsyscall_darwin_amd64.go:689 +0x39 fp=0xc0001af6b8 sp=0xc0001af688 pc=0x4100a39
golang.org/x/sys/unix.IoctlGetTermios(...)
        golang.org/x/sys@v0.0.0-20210217105451-b926d437f341/unix/ioctl.go:72
github.com/sirupsen/logrus.isTerminal(0x87296cca2bde7aa)
        github.com/sirupsen/logrus@v1.8.1/terminal_check_bsd.go:11 +0x50 fp=0xc0001af728 sp=0xc0001af6b8 pc=0x410af30
github.com/sirupsen/logrus.checkIfTerminal({0x44d6820, 0xc000198010})
        github.com/sirupsen/logrus@v1.8.1/terminal_check_notappengine.go:13 +0x75 fp=0xc0001af740 sp=0xc0001af728 pc=0x410afd5
github.com/sirupsen/logrus.(*TextFormatter).init(0xc00019a6c0, 0x8)
        github.com/sirupsen/logrus@v1.8.1/text_formatter.go:106 +0x34 fp=0xc0001af7c0 sp=0xc0001af740 pc=0x410b0b4
github.com/sirupsen/logrus.(*TextFormatter).Format.func1()
        github.com/sirupsen/logrus@v1.8.1/text_formatter.go:196 +0x25 fp=0xc0001af7e0 sp=0xc0001af7c0 pc=0x410c765
sync.(*Once).doSlow(0x44deab0, 0xc0001901c8)
        sync/once.go:68 +0xd2 fp=0xc0001af848 sp=0xc0001af7e0 pc=0x4078312
sync.(*Once).Do(...)
        sync/once.go:59
github.com/sirupsen/logrus.(*TextFormatter).Format(0xc00019a6c0, 0xc00021a1c0)
        github.com/sirupsen/logrus@v1.8.1/text_formatter.go:196 +0xebe fp=0xc0001afdb8 sp=0xc0001af848 pc=0x410c11e
github.com/sirupsen/logrus.(*Entry).write(0xc00021a1c0)
        github.com/sirupsen/logrus@v1.8.1/entry.go:279 +0x56 fp=0xc0001afe48 sp=0xc0001afdb8 pc=0x41063f6
github.com/sirupsen/logrus.(*Entry).log(0xc0001aff60, 0x4, {0xc00019c930, 0x5})
        github.com/sirupsen/logrus@v1.8.1/entry.go:251 +0x219 fp=0xc0001afeb8 sp=0xc0001afe48 pc=0x4105ff9
github.com/sirupsen/logrus.(*Entry).Log(0xc00021a150, 0x4, {0xc0001aff60, 0x70, 0x4431420})
        github.com/sirupsen/logrus@v1.8.1/entry.go:293 +0x4f fp=0xc0001afee8 sp=0xc0001afeb8 pc=0x410664f
github.com/sirupsen/logrus.(*Logger).Log(0xc00021a0e0, 0x4, {0xc0001aff60, 0x1, 0x1})
        github.com/sirupsen/logrus@v1.8.1/logger.go:198 +0x65 fp=0xc0001aff28 sp=0xc0001afee8 pc=0x4109265
github.com/sirupsen/logrus.(*Logger).Info(...)
        github.com/sirupsen/logrus@v1.8.1/logger.go:220
main.main()
        gorme/main.go:11 +0xfe fp=0xc0001aff80 sp=0xc0001aff28 pc=0x43946be
runtime.main()
        runtime/proc.go:255 +0x227 fp=0xc0001affe0 sp=0xc0001aff80 pc=0x4036fe7
runtime.goexit()
        runtime/asm_amd64.s
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
&lt;span class="octicon octicon-link"&gt;&lt;/span&gt;What did you expect to see?&lt;/h3&gt;
&lt;p&gt;In Go 1.16 things work fine:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ docker run --rm -it -v `pwd`:/app golang:1.16
root@0341e88de5ea:/go# cd /app
root@0341e88de5ea:/app# go run -trimpath .
go: downloading github.com/sirupsen/logrus v1.8.1
go: downloading github.com/lightstep/lightstep-tracer-go v0.25.0
go: downloading golang.org/x/sys v0.0.0-20210217105451-b926d437f341
go: downloading github.com/gogo/protobuf v1.3.2
go: downloading github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20210210170715-a8dfcb80d3a7
go: downloading github.com/opentracing/opentracing-go v1.0.2
go: downloading google.golang.org/grpc v1.21.0
go: downloading github.com/shirou/gopsutil/v3 v3.21.2
go: downloading golang.org/x/net v0.0.0-20201021035429-f5854403a974
go: downloading google.golang.org/genproto v0.0.0-20190530194941-fb225487d101
go: downloading github.com/tklauser/go-sysconf v0.3.4
go: downloading github.com/golang/protobuf v1.3.1
go: downloading github.com/tklauser/numcpus v0.2.1
go: downloading golang.org/x/text v0.3.3
INFO[0000] hello   
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
&lt;span class="octicon octicon-link"&gt;&lt;/span&gt;What did you see instead?&lt;/h3&gt;
&lt;p&gt;The segment violation mentioned above.&lt;/p&gt;
&lt;p&gt;Note that only when I added the lightstep tracer above did the runtime panic occur. It is probably due to enforcement of an underlying dependency namely golang.org/x/sys.&lt;/p&gt;
&lt;p&gt;If I upgrade the underlying dependency (though I've never directly used it), it actually ends up working. To be specific:&lt;/p&gt;
&lt;p&gt;This works: &lt;code&gt;golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1&lt;/code&gt;
This does not work: &lt;code&gt;golang.org/x/sys v0.0.0-20210217105451-b926d437f341 // indirect&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;However, in 1.16, both work fine. Which is why I think this is more of a Go bug rather than a library bug.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;

    &lt;/div&gt;
    &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/golang/go/issues/46763" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;




&lt;div class="ltag_github-liquid-tag"&gt;
  &lt;h1&gt;
    &lt;a href="https://github.com/golang/go/issues/45702#issuecomment-834687019" rel="noopener noreferrer"&gt;
      &lt;img class="github-logo" alt="GitHub logo" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg"&gt;
      &lt;span class="issue-title"&gt;
        Comment for
      &lt;/span&gt;
      &lt;span class="issue-number"&gt;#45702&lt;/span&gt;
    &lt;/a&gt;
  &lt;/h1&gt;
  &lt;div class="github-thread"&gt;
    &lt;div class="timeline-comment-header"&gt;
      &lt;a href="https://github.com/mark-rushakoff" rel="noopener noreferrer"&gt;
        &lt;img class="github-liquid-tag-img" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F290647%3Fu%3Dd1e245c8c3579f79019bbb746f4b7f2eb0d09894%26v%3D4" alt="mark-rushakoff avatar"&gt;
      &lt;/a&gt;
      &lt;div class="timeline-comment-header-text"&gt;
        &lt;strong&gt;
          &lt;a href="https://github.com/mark-rushakoff" rel="noopener noreferrer"&gt;mark-rushakoff&lt;/a&gt;
        &lt;/strong&gt; commented on &lt;a href="https://github.com/golang/go/issues/45702#issuecomment-834687019" rel="noopener noreferrer"&gt;&lt;time&gt;May 07, 2021&lt;/time&gt;&lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag-github-body"&gt;
      &lt;p&gt;@cherrymui yes, I was mistakenly attempting to update x/sys in GOROOT.&lt;/p&gt;
&lt;p&gt;After running &lt;code&gt;go get golang.org/x/sys@master&lt;/code&gt;, I am able to successfully run my tests without any &lt;code&gt;unexpected return pc&lt;/code&gt; errors, using &lt;code&gt;go version devel go1.17-af6123a865 Fri May 7 18:14:25 2021 +0000 darwin/amd64&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Thanks again!&lt;/p&gt;

    &lt;/div&gt;
    &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/golang/go/issues/45702#issuecomment-834687019" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Based on those Github issues, to fix &lt;code&gt;unexpected signal during runtime execution&lt;/code&gt; I need to update Go Sys package to the latest version in every my Go repo project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;go&lt;/span&gt; &lt;span class="n"&gt;get&lt;/span&gt; &lt;span class="n"&gt;golang&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;org&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="n"&gt;master&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqih09dns95ead30xxqro.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqih09dns95ead30xxqro.png" alt="Go Sys Package"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After updating Golang Sys package, I can ran my code without any issues 👍.&lt;/p&gt;

</description>
      <category>go</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Introduction to Database Transaction</title>
      <dc:creator>Muhammad Ilham hidayat</dc:creator>
      <pubDate>Sat, 10 Apr 2021 07:25:07 +0000</pubDate>
      <link>https://forem.com/milhamh95/introduction-to-database-transaction-52nm</link>
      <guid>https://forem.com/milhamh95/introduction-to-database-transaction-52nm</guid>
      <description>&lt;h2&gt;
  
  
  Database Transaction
&lt;/h2&gt;

&lt;p&gt;Database transaction is a collection of multiple database operations (ex: &lt;code&gt;SELECT&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;DELETE&lt;/code&gt;, or &lt;code&gt;INSERT&lt;/code&gt;) as a single unit of work. It represent real-world events of any company. Error handling becomes much simple for an application when using transactions.&lt;/p&gt;

&lt;p&gt;We can define where the transaction will begin and when the transaction will end. To start the transaction we use &lt;code&gt;BEGIN&lt;/code&gt; syntax.&lt;/p&gt;

&lt;p&gt;If queries in a transaction ran successfully, then we save the changes using &lt;code&gt;COMMIT&lt;/code&gt; syntax. If queries in a transaction failed to run, then we revert the changes before the transaction ran using &lt;code&gt;ROLLBACK&lt;/code&gt; syntax.&lt;/p&gt;

&lt;p&gt;Now, let's see the example of a transaction.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;

&lt;p&gt;Alice wants to transfer $100 to John. In the database, &lt;code&gt;ACCOUNT&lt;/code&gt; table stored Alice and John account data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3btgo2avfk7ebjv3srm2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3btgo2avfk7ebjv3srm2.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In a transaction, the operations are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="k"&gt;Select&lt;/span&gt; &lt;span class="n"&gt;Alice&lt;/span&gt; &lt;span class="n"&gt;account&lt;/span&gt; &lt;span class="k"&gt;data&lt;/span&gt;
&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="k"&gt;Check&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;balance&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;BALANCE&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;ACCOUNT&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;ID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;

&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="n"&gt;Substract&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;Alice&lt;/span&gt; &lt;span class="n"&gt;balance&lt;/span&gt;
&lt;span class="k"&gt;UPDATE&lt;/span&gt; &lt;span class="n"&gt;ACCOUNT&lt;/span&gt; &lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;BALANCE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;BALANCE&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;ID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;

&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="k"&gt;Add&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt; &lt;span class="k"&gt;to&lt;/span&gt; &lt;span class="n"&gt;Alice&lt;/span&gt; &lt;span class="n"&gt;balance&lt;/span&gt;
&lt;span class="k"&gt;UPDATE&lt;/span&gt; &lt;span class="n"&gt;ACCOUNT&lt;/span&gt; &lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;BALANCE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;BALANCE&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;ID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the operations was success, then we have to commit the transaction using &lt;code&gt;COMMIT&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0c4v5rffo71cwtnubhuk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0c4v5rffo71cwtnubhuk.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If one of the operations was failed, then we have to rollback the transaction using &lt;code&gt;ROLLBACK&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgd1qkkipqxs719ljrokz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgd1qkkipqxs719ljrokz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.alibabacloud.com/blog/a-deep-dive-into-database-concurrency-control_596779" rel="noopener noreferrer"&gt;Wangde - A Deep Dive into Database Concurrency Control&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@pulkitent/system-design-database-transactions-acid-part-1-45de4c350ff2" rel="noopener noreferrer"&gt;Pulkit Gupta - System Design: Database Transactions &amp;amp; ACID compliance (Part 1)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/adamedelwiess/relational-database-10-database-transaction-326eea02f87a" rel="noopener noreferrer"&gt;Adam Edelweiss - Relational Database 10 | Database Transaction&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=P80Js_qClUE" rel="noopener noreferrer"&gt;Hussein Nasser - What is a Database transaction?&lt;/a&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>sql</category>
    </item>
    <item>
      <title>Difference Between Message vs Event vs Command</title>
      <dc:creator>Muhammad Ilham hidayat</dc:creator>
      <pubDate>Mon, 01 Feb 2021 01:23:28 +0000</pubDate>
      <link>https://forem.com/milhamh95/difference-between-message-vs-event-vs-command-17h0</link>
      <guid>https://forem.com/milhamh95/difference-between-message-vs-event-vs-command-17h0</guid>
      <description>&lt;p&gt;Recently, I'm relearning event-driven architecture and publisher-subscriber systems. I often found words like &lt;code&gt;message&lt;/code&gt;, &lt;code&gt;event&lt;/code&gt;, and &lt;code&gt;command&lt;/code&gt;. Those words can be confusing for someone who want to learn event-driven architecture. Even though they have many common elements, they have different purposes and different properties.&lt;/p&gt;

&lt;h2&gt;
  
  
  Message
&lt;/h2&gt;

&lt;p&gt;Message is a request from one system to another contain a payload of all data required for processing. It can use a different format based on a contract that exists between two systems. A message has no special intent that makes it generic but also less meaningful. That's why we can use two more concepts on top of the messages.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fo31oo3nconk6wijn4h43.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fo31oo3nconk6wijn4h43.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
Message is a generic form for command and event



&lt;h2&gt;
  
  
  Command
&lt;/h2&gt;

&lt;p&gt;Command is a message from one system to another for an action to be taken. It represents a possible future and can be validated, approved, rejected, processed, and replied.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1c1llzkyji71mikguzir.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1c1llzkyji71mikguzir.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
Sender send a command to receiver



&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;Alice asked Bob to purchase an iPhone.&lt;/p&gt;

&lt;p&gt;The key command is: &lt;strong&gt;Buy an iPhone&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Event
&lt;/h2&gt;

&lt;p&gt;An event is a message to inform something has already happened in the past. An event represents the past, and it never changes once it's happened. It's &lt;strong&gt;immutable&lt;/strong&gt;, and we can't approve or reject events in the past.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgc0ty7og47q1qojvz1wc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgc0ty7og47q1qojvz1wc.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
Receiver send an event to notify sender



&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;After receive a command from Alice, Bob go to Apple store and buy a new iPhone. Bob inform Alice he already purchased an iPhone.&lt;/p&gt;

&lt;p&gt;The key event is: &lt;strong&gt;iPhone already purchased&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Message is a generic request.&lt;/li&gt;
&lt;li&gt;Command is a message to perform an action.&lt;/li&gt;
&lt;li&gt;Event is a message to inform an action has been performed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Source
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://tuhrig.de/messages-vs-events-vs-commands/" rel="noopener noreferrer"&gt;Messages vs Events vs Commands - Thomas&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://bradirby.com/2019/10/difference-between-events-and-messages/" rel="noopener noreferrer"&gt;Difference Between Event and Message - Brad Irby&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stenbeck.io/commands-vs-events/" rel="noopener noreferrer"&gt;Commands vs Events - Marcus Stenbeck&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>eventdriven</category>
      <category>message</category>
      <category>command</category>
    </item>
    <item>
      <title>How To Set Multiple Git Identities With Git Config</title>
      <dc:creator>Muhammad Ilham hidayat</dc:creator>
      <pubDate>Sat, 16 Jan 2021 11:26:47 +0000</pubDate>
      <link>https://forem.com/milhamh95/how-to-set-multiple-git-identities-with-git-config-4m66</link>
      <guid>https://forem.com/milhamh95/how-to-set-multiple-git-identities-with-git-config-4m66</guid>
      <description>&lt;p&gt;&lt;em&gt;This article is originally posted from &lt;a href="https://blog.milhamh.dev/how-to-set-multiple-git-identities-with-git-config"&gt;Hashnode&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Prerequisite&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Git 2.13&lt;/li&gt;
&lt;li&gt;Linux Command&lt;/li&gt;
&lt;li&gt;macOS / Linux&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first thing you should do after installing Git is to set your Git config identity (user name and email address). This step is important because every Git commit uses this information.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git config --global user.name "john"
$ git config --global user.email "john@doe.com"
$ git log

commit 35ba69d62d8495cdfee225b5b721b5fc07115ba1 
Author: john &amp;lt;john@doe.com&amp;gt;
Date:   Tue January 12 10:57:25 2020 +0700

feat: implement zookeeper to handle concurrent lock
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;--global&lt;/code&gt; is an option to set global Git config identity (username and password) for the current operating system user. Every repository will use that Git identity.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But if you're using Git for your personal project and work, usually you have two Git identities. How to make sure you use the right Git identity for your personal project and work?. &lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;UserName&lt;/th&gt;
&lt;th&gt;Email&lt;/th&gt;
&lt;th&gt;Git Repository&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;john&lt;/td&gt;
&lt;td&gt;&lt;a href="mailto:john@doe.com"&gt;john@doe.com&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;GitHub&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;John Doe&lt;/td&gt;
&lt;td&gt;&lt;a href="mailto:john.doe@mail.com"&gt;john.doe@mail.com&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;GitLab&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;One way to make sure you commit using your work Git Identity in your work repositories is to set Git config identity on repository level.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;On the repository level, Git config will apply to a single repository. It will not work outside that repository.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git config user.name "John Doe"
$ git config user.email "john.doe@mail.com"
$ git log

commit 35ba69d62d8495cdfee225b5b721b5fc07115ba1 
Author: John Doe &amp;lt;john.doe@mail.com&amp;gt;
Date:   Tue January 12 14:57:25 2020 +0700

feat: implement zookeeper to handle concurrent lock
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The main downside is for this approach is you need to set work Git identity for every work repository. Is it possible to apply your work Git config identity to your all work repositories?&lt;/p&gt;

&lt;p&gt;Starting from Git 2.13 Git implemented a feature called &lt;strong&gt;condition configuration includes&lt;/strong&gt;. You can set multiple Git configs for a specific directory in your home directory &lt;code&gt;~/.gitconfig&lt;/code&gt; file using &lt;code&gt;includeIf&lt;/code&gt; keyword. Using this feature, you can set Git config for your personal project and work repositories. &lt;/p&gt;

&lt;h2&gt;
  
  
  Set Multiple Identities With Git Config
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;In your home directory, create separate directories for personal project and work repositories
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ mkdir personal &amp;amp;&amp;amp; mkdir work

├── personal // for personal project repositories
├── work // for work repositories
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Open &lt;code&gt;~/.gitconfig&lt;/code&gt; in your home directory. You can set two conditional includes config for your personal project and work repositories. In &lt;code&gt;personal&lt;/code&gt; directory, Git will use &lt;code&gt;.gitconfig-personal&lt;/code&gt; config file. For &lt;code&gt;work&lt;/code&gt; directory, Git will use &lt;code&gt;gitconfig-work&lt;/code&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[includeIf "gitdir:~/personal/"] 
  path = .gitconfig-personal 

[includeIf "gitdir:~/work/"] 
  path = .gitconfig-work 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Still in home directory, create Git config for personal project and work repositories. You can set Git identity for those Git config.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ touch .gitconfig-personal &amp;amp;&amp;amp; touch .gitconfig-work

// .gitconfig-personal
[user]
name = john
email = john@doe.com

// .gitconfig-work
[user]
name = John Doe
email = john.doe@mail.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now you will have three Git config files in home directory
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.gitconfig
.gitconfig-personal
.gitconfig-work
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Let's verify the git config. Create and initiate a new git repo in your personal project and work repositories.  There will be a difference in user name and email for repositories inside &lt;code&gt;personal&lt;/code&gt; and &lt;code&gt;work&lt;/code&gt; directory.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// personal directory
$ cd ~/personal
$ mkdir personal-repo
$ cd personal-repo
$ git init
$ git config -l

...
user.name=john
user.email=john@doe.com
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// work directory
$ cd ~/work
$ mkdir work-repo
$ cd work-repo
$ git init
$ git config -l

...
user.name=John Doe
user.email=john.doe@mail.com
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Source
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.blog/2017-05-10-git-2-13-has-been-released/#conditional-configuration"&gt;Git Conditional Configuration - Jeff King&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/a/36296990"&gt;Use a different user.email and user.name for Git config based upon remote clone URL - Stack Overflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dhruvbarochiya.com/How-to-handle-multiple-git-configurations-in-one-machine/"&gt;How To Handle Multiple Git Configurations In One Machine - Dhruv Barochiya&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>git</category>
    </item>
    <item>
      <title>Fix Terminal Lags In VsCode 1.15.1</title>
      <dc:creator>Muhammad Ilham hidayat</dc:creator>
      <pubDate>Thu, 26 Nov 2020 11:18:38 +0000</pubDate>
      <link>https://forem.com/milhamh95/fix-terminal-lags-in-vscode-1-15-1-22nj</link>
      <guid>https://forem.com/milhamh95/fix-terminal-lags-in-vscode-1-15-1-22nj</guid>
      <description>&lt;p&gt;&lt;em&gt;Currently, I'm using macOS Big Sur (11.0) and VsCode 1.15.1&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Recently when I'm typing a command in VsCode integrated terminal, it become very laggy. It needs 2-3 seconds to complete. &lt;/p&gt;

&lt;p&gt;This happen when I'm trying to run &lt;code&gt;git commit -m&lt;/code&gt;. It's really annoying because I need to wait the command to appear in the terminal before I write the commit message.&lt;/p&gt;

&lt;p&gt;After googling, I finally found out how to fix it in &lt;a href="https://github.com/microsoft/vscode/issues/105446"&gt;VsCode Github Issue&lt;/a&gt;. In your terminal, please run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;// For Visual Studio Code
codesign &lt;span class="nt"&gt;--remove-signature&lt;/span&gt; /Applications/Visual&lt;span class="se"&gt;\ &lt;/span&gt;Studio&lt;span class="se"&gt;\ &lt;/span&gt;Code.app/Contents/Frameworks/Code&lt;span class="se"&gt;\ &lt;/span&gt;Helper&lt;span class="se"&gt;\ \(&lt;/span&gt;Renderer&lt;span class="se"&gt;\)&lt;/span&gt;.app

// For Visual Studio Code - Insiders
codesign &lt;span class="nt"&gt;--remove-signature&lt;/span&gt; /Applications/Visual&lt;span class="se"&gt;\ &lt;/span&gt;Studio&lt;span class="se"&gt;\ &lt;/span&gt;Code&lt;span class="se"&gt;\ &lt;/span&gt;-&lt;span class="se"&gt;\ &lt;/span&gt;Insiders.app/Contents/Frameworks/Code&lt;span class="se"&gt;\ &lt;/span&gt;-&lt;span class="se"&gt;\ &lt;/span&gt;Insiders&lt;span class="se"&gt;\ &lt;/span&gt;Helper&lt;span class="se"&gt;\ \(&lt;/span&gt;Renderer&lt;span class="se"&gt;\)&lt;/span&gt;.app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then restart VsCode or VsCode - Insiders. &lt;/p&gt;

&lt;h2&gt;
  
  
  Source
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/microsoft/vscode/issues/105446"&gt;VsCode Github Issue - Integrated Terminal Lags Intermittently&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vscode</category>
    </item>
    <item>
      <title>How To Set Up GitLab SSH Key on macOS</title>
      <dc:creator>Muhammad Ilham hidayat</dc:creator>
      <pubDate>Sun, 08 Nov 2020 09:15:43 +0000</pubDate>
      <link>https://forem.com/milhamh95/how-to-set-up-gitlab-ssh-key-on-macos-hf</link>
      <guid>https://forem.com/milhamh95/how-to-set-up-gitlab-ssh-key-on-macos-hf</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally posted at &lt;a href="https://blog.milhamh.dev/how-to-set-up-gitlab-ssh-key-on-macos"&gt;blog.milhamh.dev&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisite
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GitLab account&lt;/li&gt;
&lt;li&gt;macOS&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want to clone a repository from GitLab, there are 2 ways to do it.&lt;/p&gt;

&lt;p&gt;The first choice is using &lt;code&gt;HTTPS&lt;/code&gt;, but you need to insert your GitLab username and password every time you clone a repository. &lt;/p&gt;

&lt;p&gt;The second choice is using &lt;code&gt;SSH&lt;/code&gt; key. By using SSH key, you can clone a repository from GitLab without inserting username and password. Because, SSH key will handle the authentication.&lt;/p&gt;

&lt;p&gt;Today, we will learn how to set GitLab SSH Key on macOS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Generate SSH Key
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Open your terminal, go to .ssh directory
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/.ssh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Create your SSH Key. We will use RSA SSH key configuration.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh-keygen &lt;span class="nt"&gt;-t&lt;/span&gt; rsa &lt;span class="nt"&gt;-C&lt;/span&gt; &lt;span class="s2"&gt;"your_email_address"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;You'll see a message to insert file name for SSH key. For example, I insert: &lt;code&gt;id_rsa_gitlab_key&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Generating public/private rsa key pair.
Enter file &lt;span class="k"&gt;in &lt;/span&gt;which to save the key &lt;span class="o"&gt;(&lt;/span&gt;/home/user/.ssh/id_rsa&lt;span class="o"&gt;)&lt;/span&gt;:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Next, you'll be asked to enter passphrase. Just leave it empty
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Enter passphrase &lt;span class="o"&gt;(&lt;/span&gt;empty &lt;span class="k"&gt;for &lt;/span&gt;no passphrase&lt;span class="o"&gt;)&lt;/span&gt;:
Enter same passphrase again:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Congratulations, you just create your own SSH Key. To check SSH key exist or not, run:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-al&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;You will find two files:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;id_rsa_gitlab_key // private key
id_rsa_gitlab_key.pub // public key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Register SSH Key
&lt;/h2&gt;

&lt;p&gt;To make sure your mac able to authenticate automatically with GitLab, you need to register your SSH key to SSH agent in your mac.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start the ssh-agent.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;eval&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;ssh-agent &lt;span class="nt"&gt;-s&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Add your SSH key to SSH agent.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh-add &lt;span class="nt"&gt;-K&lt;/span&gt; ~/.ssh/id_rsa_gitlab_key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Open SSH config file.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nano ~/.ssh/config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To make sure your SSH key added automatically to SSH agent after a reboot (or logout/login), we need to set config file.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Host gitlab.com
   AddKeysToAgent yes
   UseKeychain yes   
   # IdentityFile is your ssh key file location
   IdentityFile ~/.ssh/id_rsa_gitlab_key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Save config file by using &lt;code&gt;ctrl + x&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check your SSH key in SSH agent.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh-add -l
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;You will see your SSH key has been registered to SSH agent.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Insert SSH Key to GitLab Account
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Copy your SSH Key. This key will be copied to your GitLab account.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pbcopy &amp;lt; ~/.ssh/id_rsa_gitlab_key.pub
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Go to gitlab.com, then go &lt;strong&gt;Profile &amp;gt;&amp;gt; SSH Keys&lt;/strong&gt; menu (&lt;code&gt;https://gitlab.com/profile/keys&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6KU4OZDJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/amsdeipnfwxjsvx4bpzq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6KU4OZDJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/amsdeipnfwxjsvx4bpzq.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Paste your SSH Key to &lt;strong&gt;Key&lt;/strong&gt; input, and also add the &lt;strong&gt;Title&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Press &lt;strong&gt;Add Key&lt;/strong&gt; button.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To test whether your SSH key was added correctly, run:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh &lt;span class="nt"&gt;-T&lt;/span&gt; git@gitlab.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;It should return:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Welcome to GitLab, @your_gitlab_username!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Great, now you can clone and push a repository in GitLab, getting work done and have a time with your family 😁 . &lt;/p&gt;

&lt;h2&gt;
  
  
  Source
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.gitlab.com/ee/ssh/"&gt;GitLab - GitLab and SSH keys&lt;/a&gt;&lt;/li&gt;
&lt;li&gt; &lt;a href="https://github.com/jirsbek/SSH-keys-in-macOS-Sierra-keychain"&gt;jirsbek - Saving SSH keys in macOS Sierra keychain&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>git</category>
      <category>gitlab</category>
      <category>macos</category>
    </item>
  </channel>
</rss>
