The result shows that “index.html” is absent in the desired directory. But I copied it and verified it after copying.
Please look into the SS for a better understanding.
The result shows that “index.html” is absent in the desired directory. But I copied it and verified it after copying.
Please look into the SS for a better understanding.
You need to commit and push changes from the branch, then merge the branch into master and push the changes.
Hi Santosh,
After trying twice, I have followed your advice but face with the same error
.1.pdf (231.4 KB)
I just tried this one, and it works for me as well. This person’s technique will work. I don’t think you needed to change the ownership of the cloned repo (I did not, I don’t think Santosh did either). This might be confusing the grader.
without permission change of repo under the /usr/src/kodeklouldrepos/* , I cann’t even checkout
so definitely this (Solution) is not working for me ,
So I have tried sudo for every command, able to successfully pushed the datacenter and master branch to /opt/cluster.git
but that also failed
Day-25.pdf (204.5 KB)
wasted so much time on this; it seems it won’t be worth it if I don’t finish this task off.
In a concudrum
Any feedback is apprecitated.
Even I got error in this 3 times with reason - new git branch ‘datacenter’ is not created under ‘/usr/src/kodekloudrepos/beta/’ repo on Storage server same error 3 times even after creating datacenter also
Did you use sudo and do the task as root? If you do: it works.
The trick here is to do the task as root, since both the upstream and the downstream are owned by root:
[natasha@ststor01 ~]$ sudo -i
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
[sudo] password for natasha:
[root@ststor01 ~]# cd /usr/src/kodekloudrepos/media
[root@ststor01 media]# git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
[root@ststor01 media]# ls -l
total 8
-rw-r--r-- 1 root root 34 Sep 17 22:57 info.txt
-rw-r--r-- 1 root root 26 Sep 17 22:57 welcome.txt
[root@ststor01 media]# git checkout -b xfusion
Switched to a new branch 'xfusion'
[root@ststor01 media]# cp /tmp/index.html .
[root@ststor01 media]# git add .
[root@ststor01 media]# git commit -m 'add index file'
[xfusion 1f49651] add index file
1 file changed, 1 insertion(+)
create mode 100644 index.html
[root@ststor01 media]# git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
[root@ststor01 media]# git merge xfusion
Updating 21c51bd..1f49651
Fast-forward
index.html | 1 +
1 file changed, 1 insertion(+)
create mode 100644 index.html
[root@ststor01 media]# git push origin master
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 16 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 330 bytes | 330.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
To /opt/media.git
21c51bd..1f49651 master -> master
[root@ststor01 media]#
Don’t change the ownership of either repo – the task doesn’t ask you to do that, and you absolutely do not need to do that. I confirm that this works with the grader.
I did as natasha and changed the owner ship also to natasha from root, will try again with just root user
Yes, no need to change the ownership of the repo. I tried too many times but later worked on different approach like without changing the ownership to natasha, we can execute git commands with sudo prefix which might work most of the time.