Alat Pengguna

Alat Situs


linux:Failed.Pull.from.Gitlab

Gagal Pull dari Gitlab

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

fatoni@server:/var/www/vhosts/development.co.id/project1$ git remote show origin
The authenticity of host 'gitlab.com (52.167.219.168)' can't be established.
ECDSA key fingerprint is SHA256:HbW3g8zUjNSksFbqTiUWPWg2Bq1x8xdGUrliXFzSnUw.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'gitlab.com,52.167.219.168' (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/development.co.id/project1$ git remote -v
origin  git@gitlab.com:organisasi/project1.git (fetch)
origin  git@gitlab.com:organisasi/project1.git (push)

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

fatoni@server:/var/www/vhosts/development.co.id/project1$ vim .git/config

ubah sebagai berikut :

config
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*
        #url = git@gitlab.com:organisasi/project1.git
        url = https://gitlab.com/organisasi/project1.git
[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/development.co.id/project1$ sudo -u www-data git pull origin develop
Username for 'https://gitlab.com': fatoni
Password for 'https://fatoni@gitlab.com': 
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.
From https://gitlab.com/organisasi/project1
 * 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:
        app/Domain/Activity/Factories/FollowsFactories.php
Please, commit your changes or stash them before you can merge.
Aborting

Dan berhasil….. Sekian catatan kali ini…

linux/Failed.Pull.from.Gitlab.txt · Terakhir diubah: 2018/07/08 14:30 (Perubahan eksternal)