Gagal Pull dari Gitlab

Jadi kita gagal melakukan pull dari gitlab dengan pesan galat sebagai berikut :

fatoni@server:/var/www/vhosts/$ git remote show origin
The authenticity of host ' (' can't be established.
ECDSA key fingerprint is SHA256:HbW3g8zUjNSksFbqTiUWPWg2Bq1x8xdGUrliXFzSnUw.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ',' (ECDSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

kita cek remote repository-nya :

fatoni@server:/var/www/vhosts/$ git remote -v
origin (fetch)
origin (push)

ubah remote repository-nya ke protokol https dengan mengedit berkas git/config

fatoni@server:/var/www/vhosts/$ vim .git/config

ubah sebagai berikut :

        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*
        #url =
        url =
[branch "master"]
        remote = origin
        merge = refs/heads/master
[branch "develop"]
        remote = origin
        merge = refs/heads/develop

lalu coba lakukan pull kembali,

fatoni@server:/var/www/vhosts/$ sudo -u www-data git pull origin develop
Username for '': fatoni
Password for '': 
remote: Counting objects: 24, done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 24 (delta 3), reused 12 (delta 0)
Unpacking objects: 100% (24/24), done.
 * branch            develop    -> FETCH_HEAD
   1d84a50..f202751  develop    -> origin/develop
Updating 912d624..f202751
error: Your local changes to the following files would be overwritten by merge:
Please, commit your changes or stash them before you can merge.

Dan berhasil….. Sekian catatan kali ini…

  • linux/Failed.Pull.from.Gitlab
  • Terakhir diubah: 10 bulan yang lalu
  • (Perubahan eksternal)