IBM Support

In Watson Studio Local getting "Failed to get Git Status" when trying to commit and push changes

Troubleshooting


Problem

Trying to commit and push changes in Watson Studio Local and getting the error "Failed to get Git Status"

Symptom

Error message "Failed to get Git Status
Unable to commit

Cause

A config.lock file in the /user-home/<user>/DSX_Projects/<project>/.git directory

Environment

Watson Studio Local 1.2.3.x

Diagnosing The Problem

After the error happens,  review the logs from all the dsx-core pods.
These pods handle Git and will tell more from the 'git status' errors.
Example:
kubectl get po --all-namespaces -o wide | grep dsx-core
kubectl logs kubectl logs dsx-core-5c5d495b54-w7px6 -n dsx
(replacing dsx-core-5c5d495b54-w7px6 with your pods)
In the log there will be an error like:
11/13/2019, 4:40:57 PM - error: src=ProjectGitService fn=gitStatus uid=<user id> projectPath=/user-home/<user id>/DSX_Projects/<project> msg="Error with setting upstream. error: could not lock config file .git/config: File exists
error: Unable to write upstream branch configuration
Next steps:
kubectl get pods -n dsx | grep core (get the list of dsx core pods)
kubectl exec -it -n dsx <dsx-core-pod-name> sh (use a dsx-core pod name from previous step)
cd /user-home/<user id>/DSX_Projects/<project>/.git
ls -al (lists everything inside this directory)

Resolving The Problem

If a config.lock file exists, delete it.
Try to commit and push changes in the project again.

 

Document Location

Worldwide

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSHGWL","label":"IBM Watson Studio Local"},"Component":"","Platform":[{"code":"PF016","label":"Linux"}],"Version":"1.2.3.x","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
30 December 2019

UID

ibm11108809